Repository navigation
chore: tag integration tests #20541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
chore: tag integration tests #20541
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
748f853
test: disable unit test setup
erikburt fda087b
test: tag some tests
erikburt 7a06fb8
temporarily disable e2e tests
erikburt 5cf1aab
fix: dont skip tagged tests
erikburt 13b3f20
fix: tag more tests
erikburt 9d07c6c
fix: workflow
erikburt 179af19
test: more tagging
erikburt 1e524a6
test: more tagging
erikburt f006fd2
fix: shared helpers
erikburt 3dc22a1
test: list all tags
erikburt 46c5478
fix
erikburt c65d525
more tagging
erikburt 7fef6eb
more matrix
erikburt 0e590d6
fix build errors
erikburt 5f0d1c2
more tagging
erikburt d48b50b
always install plugins?
erikburt 9f300c3
fix: tagging
erikburt e82a204
more resources
erikburt 90ee329
even more tagging
erikburt 6f0397c
fix: artifact naming for tests
erikburt cdf4c17
more tagging
erikburt f90ebf8
last one?
erikburt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,190 @@ | ||
| name: CI Core Integration | ||
| run-name: CI Core Integration | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
| cancel-in-progress: true | ||
|
|
||
| # Run on key branches to make sure integration is good, otherwise run on all PR's | ||
| on: | ||
| push: | ||
| branches: | ||
| - develop | ||
| - "release/*" | ||
| merge_group: | ||
| pull_request: | ||
|
|
||
|
|
||
| jobs: | ||
| list-all-tag-combinations: | ||
| name: List all tag combinations | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: List all tags (./core/) | ||
| working-directory: ./core | ||
| run: | | ||
| find . -name '*.go' -print0 \ | ||
| | xargs -0 grep -hE '^[[:space:]]*//(go:build|\+build)' 2>/dev/null \ | ||
| | sed -E ' | ||
| s|^[[:space:]]*//go:build[[:space:]]+||; | ||
| s|^[[:space:]]*//\+build[[:space:]]+||; | ||
| s/[[:space:]]+$// | ||
| ' \ | ||
| | sed -E '/^[[:space:]]*$/d' \ | ||
| | sort -u | ||
|
|
||
| - name: List all tags (./deployment/) | ||
| working-directory: ./deployment | ||
| run: | | ||
| find . -name '*.go' -print0 \ | ||
| | xargs -0 grep -hE '^[[:space:]]*//(go:build|\+build)' 2>/dev/null \ | ||
| | sed -E ' | ||
| s|^[[:space:]]*//go:build[[:space:]]+||; | ||
| s|^[[:space:]]*//\+build[[:space:]]+||; | ||
| s/[[:space:]]+$// | ||
| ' \ | ||
| | sed -E '/^[[:space:]]*$/d' \ | ||
| | sort -u | ||
|
|
||
| tagged-tests: | ||
| env: | ||
| # We explicitly have this env var not be "CL_DATABASE_URL" to avoid having it be used by core related tests | ||
| # when they should not be using it, while still allowing us to DRY up the setup | ||
| DB_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| type: | ||
| - module: Deployment | ||
| cmd: go_core_ccip_deployment_tests | ||
| os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache | ||
| tags: "integration solana" | ||
| go-mod-directory: "deployment/" | ||
| setup-solana: "true" | ||
| setup-plugins: "true" | ||
|
|
||
| - module: Deployment | ||
| cmd: go_core_ccip_deployment_tests | ||
| os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache | ||
| tags: "integration aptos" | ||
| go-mod-directory: "deployment/" | ||
| aptos-cli-version: "7.10.0" | ||
| setup-plugins: "true" | ||
|
|
||
| - module: Deployment | ||
| cmd: go_core_ccip_deployment_tests | ||
| os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache | ||
| tags: "integration db" | ||
| go-mod-directory: "deployment/" | ||
| setup-plugins: "true" | ||
|
|
||
| name: "${{ matrix.type.module }} - Tagged Tests (${{matrix.type.tags}})" | ||
| timeout-minutes: 20 | ||
| runs-on: runs-on=${{ github.run_id }}-${{ strategy.job-index }}/${{ matrix.type.os }} | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| actions: read | ||
| steps: | ||
| - name: Enable S3 Cache for Self-Hosted Runners | ||
| # these env vars are set (and exposed) when it is a self-hosted runner with extras=s3-cache | ||
| if: ${{ env.RUNS_ON_INSTANCE_ID != '' && env.ACTIONS_CACHE_URL != '' }} | ||
| uses: runs-on/action@66d4449b717b5462159659523d1241051ff470b9 # v1 | ||
|
|
||
| - name: Checkout the repo | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup Go | ||
| uses: ./.github/actions/setup-go | ||
| with: | ||
| build-cache-version: ${{ matrix.type.cmd }} | ||
| go-version-file: ${{ matrix.type.go-mod-directory }}go.mod | ||
| go-module-file: ${{ matrix.type.go-mod-directory }}go.sum | ||
|
|
||
| - name: Setup Postgres | ||
| uses: smartcontractkit/.github/actions/setup-postgres@setup-postgres/v1 | ||
| with: | ||
| tmpfs: "true" | ||
| image-tag: "16-alpine" | ||
|
|
||
| - name: Setup DB | ||
| run: go run ./core/store/cmd/preparetest | ||
| env: | ||
| CL_DATABASE_URL: ${{ env.DB_URL }} | ||
|
|
||
| - name: Touching core/web/assets/index.html | ||
| run: mkdir -p core/web/assets && touch core/web/assets/index.html | ||
|
|
||
| - name: Download Go vendor packages | ||
| run: go mod download | ||
|
|
||
| - name: Setup Solana | ||
| if: matrix.type.setup-solana == 'true' | ||
| uses: ./.github/actions/setup-solana | ||
|
|
||
| - name: Setup Aptos | ||
| if: ${{ matrix.type.aptos-cli-version != '' }} | ||
| uses: aptos-labs/actions/install-aptos-cli@63740b290d839b87ecfafbcf75ed03a36a54a29f # jan 15, 2025 | ||
| with: | ||
| CLI_VERSION: ${{ matrix.type.aptos-cli-version }} | ||
|
|
||
| # - name: Setup Sui CLI v1.57.2 | ||
| # uses: ./.github/actions/setup-sui | ||
| # with: | ||
| # github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| # version: mainnet-1.57.2 | ||
|
|
||
| - name: Setup wasmd | ||
| if: matrix.type.setup-plugins == 'true' | ||
| uses: ./.github/actions/setup-wasmd | ||
|
|
||
| - name: Install LOOP Plugins | ||
| if: matrix.type.setup-plugins == 'true' | ||
| run: make install-plugins | ||
|
|
||
| - name: Run tests | ||
| timeout-minutes: 22 | ||
| id: run-tests | ||
| shell: bash | ||
| env: | ||
| GO_TEST_TAGS: ${{ matrix.type.tags }} | ||
| CL_DATABASE_URL: ${{ env.DB_URL }} | ||
| OUTPUT_FILE: ./output.txt | ||
| PRODUCE_JUNIT_XML: true | ||
| JUNIT_FILE: ${{ github.workspace }}/junit.xml | ||
| RUN_QUARANTINED_TESTS: "true" # always run quarantined tests in CI | ||
| run: | | ||
| GODEBUG=goindex=0 ./tools/bin/${{ matrix.type.cmd }} ./... | ||
| # See: https://github.com/golang/go/issues/69179 | ||
|
|
||
| - name: Artifact name | ||
| id: artifact-name | ||
| if: ${{ always() }} | ||
| env: | ||
| CMD: ${{ matrix.type.cmd }} | ||
| TAGS: ${{ matrix.type.tags }} | ||
| run: | | ||
| # replace spaces with underscores for artifact names | ||
| TAGS_UNDERSCORED=${TAGS// /_} | ||
| echo "artifact-name=${CMD}_${TAGS_UNDERSCORED}_logs" | tee -a "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Store logs artifacts | ||
| if: ${{ always() }} | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ steps.artifact-name.outputs.artifact-name }} | ||
| path: | | ||
| ./output.txt | ||
| ./output-short.txt | ||
| ./race.* | ||
| ./coverage.txt | ||
| ./postgres_logs.txt | ||
| ./junit.xml | ||
| ./deployment/junit.xml | ||
| retention-days: 7 | ||
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
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
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
2 changes: 2 additions & 0 deletions
2
.../ccip/changeset/aptos/config/lane_test.go → .../changeset/aptos/config/lane_unit_test.go
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| //go:build !integration | ||
|
|
||
| package config | ||
|
|
||
| import ( | ||
|
|
||
2 changes: 2 additions & 0 deletions
2
...changeset/aptos/cs_add_token_pool_test.go → ...set/aptos/cs_add_token_pool_integ_test.go
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| //go:build integration && aptos | ||
|
|
||
| package aptos_test | ||
|
|
||
| import ( | ||
|
|
||
2 changes: 2 additions & 0 deletions
2
...geset/aptos/cs_deploy_aptos_chain_test.go → ...aptos/cs_deploy_aptos_chain_integ_test.go
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| //go:build integration && aptos | ||
|
|
||
| package aptos | ||
|
|
||
| import ( | ||
|
|
||
2 changes: 2 additions & 0 deletions
2
...angeset/aptos/cs_set_ocr3_offramp_test.go → ...t/aptos/cs_set_ocr3_offramp_integ_test.go
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| //go:build integration && aptos | ||
|
|
||
| package aptos_test | ||
|
|
||
| import ( | ||
|
|
||
2 changes: 2 additions & 0 deletions
2
...geset/aptos/cs_update_aptos_lanes_test.go → ...aptos/cs_update_aptos_lanes_integ_test.go
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| //go:build integration && aptos | ||
|
|
||
| package aptos_test | ||
|
|
||
| import ( | ||
|
|
||
2 changes: 2 additions & 0 deletions
2
.../cs_configure_evm_signer_registry_test.go → ...onfigure_evm_signer_registry_unit_test.go
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| //go:build !integration | ||
|
|
||
| package ccip_attestation_test | ||
|
|
||
| import ( | ||
|
|
||
2 changes: 2 additions & 0 deletions
2
...ion/cs_deploy_evm_signer_registry_test.go → ...s_deploy_evm_signer_registry_unit_test.go
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| //go:build !integration | ||
|
|
||
| package ccip_attestation_test | ||
|
|
||
| import ( | ||
|
|
||
2 changes: 2 additions & 0 deletions
2
.../cs_set_token_transfer_fee_config_test.go → ...t_token_transfer_fee_config_integ_test.go
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| //go:build integration && solana | ||
|
|
||
| package crossfamily_test | ||
|
|
||
| import ( | ||
|
|
||
2 changes: 2 additions & 0 deletions
2
...amily/v1_6/cs_add_evm_solana_lane_test.go → ...v1_6/cs_add_evm_solana_lane_integ_test.go
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| //go:build integration && solana | ||
|
|
||
| package v1_6_test | ||
|
|
||
| import ( | ||
|
|
||
2 changes: 2 additions & 0 deletions
2
...eset/cs_grant_and_mint_link_token_test.go → ...cs_grant_and_mint_link_token_unit_test.go
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| //go:build !integration | ||
|
|
||
| package changeset_test | ||
|
|
||
| import ( | ||
|
|
||
2 changes: 2 additions & 0 deletions
2
...angeset/cs_orchestrate_changesets_test.go → ...et/cs_orchestrate_changesets_unit_test.go
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| //go:build !integration | ||
|
|
||
| package changeset_test | ||
|
|
||
| import ( | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 12 months ago
The best way to fix the problem is to explicitly set the
permissionsfor thelist-all-tag-combinationsjob. According to least privilege principles and since this job only checks out code and runs a few shell commands, it only requires read access to repository contents. Therefore, add apermissionsblock to the job withcontents: readas the only permission.To implement, insert the block under
list-all-tag-combinations:(indented to match the other keys), beforeruns-on: .... No other code changes are needed.