snapshot of https://github.com/ThreeDotsLabs/watermill.git (master, 2026-09-15; blobs > 131072B omitted)
Some checks failed
master / ci (push) Failing after 0s
Some checks failed
master / ci (push) Failing after 0s
This commit is contained in:
13
.github/workflows/master.yml
vendored
Normal file
13
.github/workflows/master.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
name: master
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
ci:
|
||||
uses: ThreeDotsLabs/watermill/.github/workflows/tests.yml@master
|
||||
with:
|
||||
stress-tests: true
|
||||
codecov: true
|
||||
secrets:
|
||||
codecov_token: ${{ secrets.CODECOV_TOKEN }}
|
||||
52
.github/workflows/pr-examples.yml
vendored
Normal file
52
.github/workflows/pr-examples.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: pr-examples
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '_examples/**/*'
|
||||
|
||||
jobs:
|
||||
detect-changed-examples:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
examples: ${{ steps.set.outputs.examples }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- id: set
|
||||
env:
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||
run: |
|
||||
changed=$(git diff --name-only "$BASE_SHA"..."$HEAD_SHA")
|
||||
example_dirs=$(find _examples -name '.validate_example*.yml' -exec dirname {} \; | sort -u)
|
||||
examples=()
|
||||
while IFS= read -r dir; do
|
||||
if printf '%s\n' "$changed" | grep -q "^${dir}/"; then
|
||||
examples+=("${dir#_examples/}")
|
||||
fi
|
||||
done <<< "$example_dirs"
|
||||
if [ ${#examples[@]} -eq 0 ]; then
|
||||
json='[]'
|
||||
else
|
||||
json=$(jq -c -n '$ARGS.positional' --args "${examples[@]}")
|
||||
fi
|
||||
echo "examples=$json" >> "$GITHUB_OUTPUT"
|
||||
echo "Detected changed examples: $json"
|
||||
|
||||
validate:
|
||||
needs: detect-changed-examples
|
||||
if: needs.detect-changed-examples.outputs.examples != '[]'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
example: ${{ fromJSON(needs.detect-changed-examples.outputs.examples) }}
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '^1.26'
|
||||
- name: Validate ${{ matrix.example }}
|
||||
run: cd dev/validate-examples && go run main.go "${{ matrix.example }}"
|
||||
10
.github/workflows/pr.yml
vendored
Normal file
10
.github/workflows/pr.yml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
name: pr
|
||||
on:
|
||||
pull_request:
|
||||
jobs:
|
||||
ci:
|
||||
uses: ThreeDotsLabs/watermill/.github/workflows/tests.yml@master
|
||||
with:
|
||||
codecov: true
|
||||
secrets:
|
||||
codecov_token: ${{ secrets.CODECOV_TOKEN }}
|
||||
95
.github/workflows/tests.yml
vendored
Normal file
95
.github/workflows/tests.yml
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
name: tests
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
stress-tests:
|
||||
description: 'Run stress tests'
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
codecov:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
runs-on:
|
||||
required: false
|
||||
type: string
|
||||
default: 'ubuntu-latest'
|
||||
secrets:
|
||||
codecov_token:
|
||||
required: false
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '^1.26'
|
||||
- run: make build
|
||||
|
||||
detect-modules:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
modules: ${{ steps.set-modules.outputs.modules }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '^1.26'
|
||||
- id: set-modules
|
||||
run: echo "modules=$(go list -m -json | jq -s '.' | jq -c '[.[].Dir]')" >> $GITHUB_OUTPUT
|
||||
|
||||
lint:
|
||||
needs: detect-modules
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
modules: ${{ fromJSON(needs.detect-modules.outputs.modules) }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '^1.26'
|
||||
- name: golangci-lint ${{ matrix.modules }}
|
||||
uses: golangci/golangci-lint-action@v9.2.0
|
||||
with:
|
||||
working-directory: ${{ matrix.modules }}
|
||||
|
||||
tests:
|
||||
needs: [build]
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '^1.26'
|
||||
- run: cat .env >> $GITHUB_ENV || true
|
||||
- run: make up
|
||||
- run: make wait
|
||||
- run: make test_short
|
||||
- run: make test
|
||||
timeout-minutes: 30
|
||||
- run: make test_race
|
||||
- run: make test_stress
|
||||
if: ${{ inputs.stress-tests }}
|
||||
- name: Dump docker logs on failure
|
||||
if: failure()
|
||||
uses: jwalton/gh-docker-logs@a8cb5301950dd4d2b86619cd487b3b281526b178 # v2.2.0
|
||||
codecov:
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
if: ${{ inputs.codecov }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '^1.26'
|
||||
- run: cat .env >> $GITHUB_ENV || true
|
||||
- run: make up
|
||||
- run: make wait
|
||||
- run: make test_codecov
|
||||
- uses: codecov/codecov-action@v4
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
files: ./coverage.out
|
||||
token: ${{ secrets.codecov_token }}
|
||||
Reference in New Issue
Block a user