Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f691a16
chore: skip unnecessary tests
erikburt Dec 11, 2025
0a0343d
chore: updates to test scripts
erikburt Dec 11, 2025
3f175b5
chore: bump chainlink-common
erikburt Dec 11, 2025
16d3e97
test: create/modify pipelines
erikburt Dec 11, 2025
3981124
test: tag deployment tests
erikburt Dec 11, 2025
4c29bce
test: enable new pipeline
erikburt Dec 11, 2025
0777743
test: tag more tests
erikburt Dec 11, 2025
f038bd5
test: tag aptos tests
erikburt Dec 11, 2025
2ca644d
test: tag more tests
erikburt Dec 11, 2025
8694b90
test: specific workflows
erikburt Dec 11, 2025
2c77a4f
test: tag more tests
erikburt Dec 11, 2025
57b6871
test: enable new test tags
erikburt Dec 11, 2025
d9a4a79
fix: naming collisions
erikburt Dec 11, 2025
cfacf42
more test tagging
erikburt Dec 11, 2025
8dfbb91
more test tagging
erikburt Dec 11, 2025
26c6cdc
test scripts
erikburt Dec 11, 2025
cd8032a
more test tagging
erikburt Dec 12, 2025
a9db8f3
fix some tests
erikburt Dec 12, 2025
959b6d2
more test tagging
erikburt Dec 12, 2025
d43bf17
test: config_test whitespace
erikburt Dec 12, 2025
826f931
more test tagging
erikburt Dec 12, 2025
533c72b
more test tagging
erikburt Dec 12, 2025
2d61013
more test tagging
erikburt Dec 12, 2025
fef7a19
more test tagging
erikburt Dec 12, 2025
c1932b4
fix: test line numbers
erikburt Dec 12, 2025
0ed61f5
fix: goimports
erikburt Dec 12, 2025
d9d2cc0
test: integration-tagged tests
erikburt Dec 12, 2025
23dd843
more fixes
erikburt Dec 12, 2025
b37857f
more fixes
erikburt Dec 13, 2025
5e4de6e
try graviton for unit tests
erikburt Dec 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
84 changes: 14 additions & 70 deletions .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ jobs:
# core-non-ignored - all changes except for paths which do not affect core module
# - This is opt-in on purpose. To be safe, new files are assumed to have an affect on core unless listed here specifically.
# - For example: core module does not depend on deployment or integration-tests module.
# all - changes in any directory
# - This is used resolve all affected modules based on changed files
list-files: json
filters: |
core-non-ignored:
Expand All @@ -93,8 +91,6 @@ jobs:
- '!LICENSE'
- '!.github/**'
- '!core/scripts/cre/environment/examples/workflows/**'
all:
- '**'

- name: Changed modules
id: changed-modules
Expand Down Expand Up @@ -197,25 +193,20 @@ jobs:
fi

core:
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:
- cmd: go_core_tests
os: ${{ needs.runner-config.outputs.core-tests-runner }}
should-run: ${{ needs.filter.outputs.should-run-core-tests }}
trunk-auto-quarantine: "true"
test-suite: "unit"
# trunk-auto-quarantine: "true"

# migrated to ci-integration.yml workflow
- cmd: go_core_tests_integration
os: ${{ needs.runner-config.outputs.core-tests-integration-runner }}
should-run: ${{ needs.filter.outputs.should-run-core-tests }}
trunk-auto-quarantine: "true"
setup-solana: "true"
install-loopps: "true"
os: ubuntu-latest
should-run: false

- cmd: go_core_fuzz
os: ${{ needs.runner-config.outputs.core-fuzz-tests-runner }}
Expand All @@ -228,14 +219,11 @@ jobs:
- cmd: go_core_ccip_deployment_tests
os: ${{ needs.runner-config.outputs.deployment-tests-runner }}
should-run: ${{ needs.filter.outputs.should-run-deployment-tests }}
trunk-auto-quarantine: "true"
go-mod-directory: "deployment/"
setup-solana: "true"
setup-aptos: "true"
install-loopps: "true"
setup-sui: "true"
test-suite: "unit"
# trunk-auto-quarantine: "true"

name: Core Tests (${{ matrix.type.cmd }}) # Be careful modifying the job name, as it is used to fetch the job URL
name: Core Tests (${{ matrix.type.cmd }})
# We don't directly merge dependabot PRs, so let's not waste the resources
if: ${{ github.actor != 'dependabot[bot]' }}
needs: [filter, run-frequency, runner-config]
Expand Down Expand Up @@ -267,34 +255,6 @@ jobs:
go-version-file: ${{ matrix.type.go-mod-directory }}go.mod
go-module-file: ${{ matrix.type.go-mod-directory }}go.sum

- name: Setup Solana
if: ${{ matrix.type.should-run == 'true' && matrix.type.setup-solana == 'true' }}
uses: ./.github/actions/setup-solana

- name: Setup Aptos
if: ${{ matrix.type.should-run == 'true' && matrix.type.setup-aptos == 'true' }}
uses: aptos-labs/actions/install-aptos-cli@63740b290d839b87ecfafbcf75ed03a36a54a29f # jan 15, 2025
with:
CLI_VERSION: 7.10.0

- name: Setup Sui CLI v1.61.2
if: ${{ matrix.type.should-run == 'true' && matrix.type.setup-sui == 'true' }}
uses: ./.github/actions/setup-sui
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version: mainnet-v1.61.2

- name: Setup wasmd
if: ${{ matrix.type.should-run == 'true' }}
uses: ./.github/actions/setup-wasmd

- name: Setup Postgres
if: ${{ matrix.type.should-run == 'true' }}
uses: smartcontractkit/.github/actions/setup-postgres@setup-postgres/v1
with:
tmpfs: "true"
image-tag: "16-alpine"

- name: Touching core/web/assets/index.html
if: ${{ matrix.type.should-run == 'true' }}
run: mkdir -p core/web/assets && touch core/web/assets/index.html
Expand All @@ -303,16 +263,6 @@ jobs:
if: ${{ matrix.type.should-run == 'true' }}
run: go mod download

- name: Setup DB
if: ${{ matrix.type.should-run == 'true' }}
run: go run ./core/store/cmd/preparetest
env:
CL_DATABASE_URL: ${{ env.DB_URL }}

- name: Install LOOP Plugins
if: ${{ matrix.type.should-run == 'true' && matrix.type.install-loopps == 'true' }}
run: make install-plugins

- name: Increase Timeouts for Fuzz/Race
# Increase timeouts for scheduled runs only
if: ${{ github.event.schedule != '' && matrix.type.should-run == 'true' }}
Expand All @@ -328,9 +278,9 @@ jobs:
id: run-tests
shell: bash
env:
CL_DATABASE_URL: ${{ env.DB_URL }}
CL_CURRENT_TEST_SUITE: ${{ matrix.type.test-suite }}
OUTPUT_FILE: ./output.txt
PRODUCE_JUNIT_XML: ${{ matrix.type.trunk-auto-quarantine }}
PRODUCE_JUNIT_XML: "true"
TRUNK_AUTO_QUARANTINE: ${{ matrix.type.trunk-auto-quarantine }}
RUN_QUARANTINED_TESTS: "true" # always run quarantined tests in CI
JUNIT_FILE: ${{ github.workspace }}/junit.xml
Expand Down Expand Up @@ -367,12 +317,6 @@ jobs:
echo "github.event_name: ${{ github.event_name }}"
echo "github.ref: ${{ github.ref }}"

- name: Print postgres logs
if: ${{ always() && matrix.type.should-run == 'true' }}
uses: smartcontractkit/.github/actions/setup-postgres@setup-postgres/v1
with:
print-logs: "true"

- name: Store logs artifacts
if: ${{ always() && matrix.type.should-run == 'true' }}
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -604,10 +548,10 @@ jobs:
runs-on: ubuntu-latest
env:
# include unique label (core/deployment/etc...) to ensure jobs are not competing for the same runner
SH_TEST_RUNNER: runs-on=${{ github.run_id }}-core/cpu=48/ram=96/family=c6i/spot=false/image=ubuntu24-full-x64/extras=s3-cache+tmpfs
SH_DEPLOYMENT_TEST_RUNNER: runs-on=${{ github.run_id }}-deployment/cpu=48/ram=96/family=c6id/spot=false/image=ubuntu24-full-x64/extras=s3-cache
SH_FUZZ_RUNNER: runs-on=${{ github.run_id}}-fuzz/cpu=8+16/ram=32+64/family=c6id+m6id+m6idn/spot=false/image=ubuntu24-full-x64/extras=s3-cache
SH_RACE_TEST_RUNNER: runs-on=${{ github.run_id}}-race/cpu=64+128/ram=128+128/family=c7+m7/disk=large/spot=false/image=ubuntu24-full-x64/extras=s3-cache
SH_TEST_RUNNER: runs-on=${{ github.run_id }}-core/cpu=32/ram=64/family=c6gd/spot=false/image=ubuntu24-full-arm64/extras=s3-cache
SH_DEPLOYMENT_TEST_RUNNER: runs-on=${{ github.run_id }}-deployment/cpu=32/ram=64/family=c6gd/spot=false/image=ubuntu24-full-arm64/extras=s3-cache
SH_FUZZ_RUNNER: runs-on=${{ github.run_id}}-fuzz/cpu=8/ram=32/family=c6id+m6id+m6idn/spot=false/image=ubuntu24-full-x64/extras=s3-cache
SH_RACE_TEST_RUNNER: runs-on=${{ github.run_id}}-race/cpu=64/ram=128/family=c7g/spot=false/image=ubuntu24-full-arm64/extras=s3-cache+tmpfs
SH_LINT_RUNNER: runs-on=${{ github.run_id }}-lint/cpu=16/ram=32/family=c6gd/spot=false/image=ubuntu24-full-arm64/extras=s3-cache
GH_TEST_RUNNER: ubuntu22.04-32cores-128GB
GH_FUZZ_RUNNER: ubuntu22.04-8cores-32GB
Expand Down
236 changes: 236 additions & 0 deletions .github/workflows/ci-extended-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
name: CI Extended Tests

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:
identify-test-suites:
name: Identify Test Suites
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout the repo
uses: actions/checkout@v5
with:
persist-credentials: false

- name: Identify Test Suites (core)
run: |
find . -path './deployment' -prune -o -name '*_test.go' -print0 \
| xargs -0 grep -Pho 'tests\.BelongsToCISuite\s*\(\s*t\s*,\s*"\K[^"]*(?="\s*\))' \
| sort \
| uniq -c \
| sort -nr

- name: Identify Test Suites (deployment)
run: |
find ./deployment -name '*_test.go' -print0 \
| xargs -0 grep -Pho 'tests\.BelongsToCISuite\s*\(\s*t\s*,\s*"\K[^"]*(?="\s*\))' \
| sort \
| uniq -c \
| sort -nr

changed-modules:
name: Detect Changes
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
outputs:
core-changes: ${{ contains(fromJson(steps.changed-modules.outputs.modules-json), '.') }}
deployment-changes: ${{ contains(fromJson(steps.changed-modules.outputs.modules-json), 'deployment') }}
steps:
- name: Checkout the repo
uses: actions/checkout@v5
with:
persist-credentials: false

- name: Detect changed modules
id: changed-modules
uses: smartcontractkit/.github/actions/changed-modules-go@changed-modules-go/v1
with:
file-patterns: |
**
!.changeset/**
!**/*.Dockerfile
!tools/secrets/**
!tools/docker/**
!tools/benchmark/**
!**/README.md
!**/CHANGELOG.md
!*.nix
!sonar-project.properties
!nix.conf
!nix-darwin-shell-hook.sh
!LICENSE
!.github/**
!core/scripts/cre/environment/examples/workflows/**
module-patterns: |
**
!core/scripts/**
!integration-tests/**
!system-tests/**

extended-tests:
name: "${{ matrix.type.module }} (${{matrix.type.test-suite}})"
timeout-minutes: 20
runs-on: runs-on=${{ github.run_id }}-${{ strategy.job-index }}/${{ matrix.type.os }}
permissions:
id-token: write
contents: read
actions: read
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: Core
test-suite: "with-db"
cmd: go_core_tests
os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache

- module: Core
test-suite: "test-scripts"
cmd: go_core_tests
os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache

- module: Core
test-suite: "integration"
go-build-tags: "integration"
cmd: go_core_tests
os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache
setup-loopps: "true"
setup-solana: "true"

- module: Deployment
cmd: go_core_ccip_deployment_tests
test-suite: "solana"
os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache
go-mod-directory: "deployment/"
setup-solana: "true"

- module: Deployment
test-suite: "aptos"
cmd: go_core_ccip_deployment_tests
os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache
go-mod-directory: "deployment/"
aptos-cli-version: "7.10.0"
setup-loopps: "true"

- module: Deployment
test-suite: "with-db"
cmd: go_core_ccip_deployment_tests
os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache
go-mod-directory: "deployment/"

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@v5
with:
persist-credentials: false

- name: Setup Go
uses: ./.github/actions/setup-go
with:
build-cache-version: ${{ matrix.type.cmd }}-${{ matrix.type.test-suite }}
go-version-file: ${{ matrix.type.go-mod-directory }}go.mod
go-module-file: ${{ matrix.type.go-mod-directory }}go.sum

- name: Setup Postgres Container
uses: smartcontractkit/.github/actions/setup-postgres@setup-postgres/v1
with:
tmpfs: "true"
image-tag: "16-alpine"

- name: Standard setup commands
env:
CL_DATABASE_URL: ${{ env.DB_URL }}
run: |
echo "::group::Run core/store/cmd/preparetest"
go run ./core/store/cmd/preparetest
echo "::endgroup::"

echo "::group::Touching core/web/assets/index.html"
mkdir -p core/web/assets && touch core/web/assets/index.html
echo "::endgroup::"

echo "::group::Download Go vendor packages"
go mod download
echo "::endgroup::"

- 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
if: ${{ matrix.type.sui-cli-version != '' }}
uses: ./.github/actions/setup-sui
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ matrix.type.sui-cli-version }}

- name: Setup wasmd
if: ${{ matrix.type.setup-loopps == 'true' }}
uses: ./.github/actions/setup-wasmd

- name: Install LOOP Plugins
if: ${{ matrix.type.setup-loopps == 'true' }}
run: make install-plugins

- name: Run tests
timeout-minutes: 22
id: run-tests
shell: bash
env:
CL_CURRENT_TEST_SUITE: ${{ matrix.type.test-suite }}
GO_BUILD_TAGS: ${{ matrix.type.go-build-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: Store logs artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.type.cmd }}_${{matrix.type.test-suite}}_logs
path: |
./output.txt
./output-short.txt
./race.*
./coverage.txt
./postgres_logs.txt
./junit.xml
./deployment/junit.xml
retention-days: 7
Loading
Loading