test: Fix mempool flakes #6904
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| merge_group: | |
| types: [checks_requested] | |
| workflow_dispatch: | |
| inputs: | |
| avalanchegoRepo: | |
| description: "avalanchego github repository" | |
| required: true | |
| default: "ava-labs/avalanchego" | |
| avalanchegoBranch: | |
| description: "avalanchego branch" | |
| required: true | |
| default: "master" | |
| jobs: | |
| lint_test: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.event.inputs.avalanchegoRepo }} | |
| ref: ${{ github.event.inputs.avalanchegoBranch }} | |
| path: avalanchego | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: "go.mod" | |
| cache-dependency-path: | | |
| go.sum | |
| tools/go.sum | |
| tools/legacy-golangci-lint.sum | |
| - name: change avalanchego dep | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| run: | | |
| go mod edit -replace github.com/ava-labs/avalanchego=./avalanchego | |
| go mod tidy | |
| go clean -modcache | |
| - name: Run all lint checks | |
| run: ./scripts/run_task.sh lint-all-ci | |
| - name: Check go.mod and go.sum are up-to-date | |
| run: ./scripts/run_task.sh check-go-mod-tidy | |
| - name: Ensure consistent avalanchego version | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: ./scripts/run_task.sh check-avalanchego-version | |
| unit_test: | |
| name: Golang Unit Tests (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, ubuntu-22.04, ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.event.inputs.avalanchegoRepo }} | |
| ref: ${{ github.event.inputs.avalanchegoBranch }} | |
| path: avalanchego | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: "go.mod" | |
| cache-dependency-path: | | |
| go.sum | |
| tools/go.sum | |
| - name: change avalanchego dep | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| run: | | |
| go mod edit -replace github.com/ava-labs/avalanchego=./avalanchego | |
| go mod tidy | |
| - run: go mod download | |
| - name: Check generated codec files are up to date | |
| run: ./scripts/run_task.sh check-generate-codec | |
| - name: Check generated mocks are up to date | |
| run: ./scripts/run_task.sh check-generate-mocks | |
| - run: ./scripts/run_task.sh build | |
| - run: ./scripts/run_task.sh build-test | |
| env: | |
| TIMEOUT: ${{ env.TIMEOUT }} | |
| - run: ./scripts/run_task.sh coverage | |
| avalanchego_e2e: | |
| name: AvalancheGo E2E Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.event.inputs.avalanchegoRepo }} | |
| ref: ${{ github.event.inputs.avalanchegoBranch }} | |
| path: avalanchego | |
| token: ${{ secrets.AVALANCHE_PAT }} | |
| - name: Run e2e tests | |
| uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@63cc1a166a56e749f3c02856babbde596757f1e1 | |
| with: | |
| run: ./scripts/run_task.sh test-e2e-ci | |
| prometheus_url: ${{ secrets.PROMETHEUS_URL || '' }} | |
| prometheus_push_url: ${{ secrets.PROMETHEUS_PUSH_URL || '' }} | |
| prometheus_username: ${{ secrets.PROMETHEUS_ID || '' }} | |
| prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }} | |
| loki_url: ${{ secrets.LOKI_URL || '' }} | |
| loki_push_url: ${{ secrets.LOKI_PUSH_URL || '' }} | |
| loki_username: ${{ secrets.LOKI_ID || '' }} | |
| loki_password: ${{ secrets.LOKI_PASSWORD || '' }} | |
| e2e_warp: | |
| name: e2e warp tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.event.inputs.avalanchegoRepo }} | |
| ref: ${{ github.event.inputs.avalanchegoBranch }} | |
| path: avalanchego | |
| - name: Run Warp E2E Tests | |
| uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@63cc1a166a56e749f3c02856babbde596757f1e1 | |
| with: | |
| run: ./scripts/run_task.sh test-e2e-warp-ci | |
| artifact_prefix: warp | |
| prometheus_url: ${{ secrets.PROMETHEUS_URL || '' }} | |
| prometheus_push_url: ${{ secrets.PROMETHEUS_PUSH_URL || '' }} | |
| prometheus_username: ${{ secrets.PROMETHEUS_ID || '' }} | |
| prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }} | |
| loki_url: ${{ secrets.LOKI_URL || '' }} | |
| loki_push_url: ${{ secrets.LOKI_PUSH_URL || '' }} | |
| loki_username: ${{ secrets.LOKI_ID || '' }} | |
| loki_password: ${{ secrets.LOKI_PASSWORD || '' }} |