Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/actions/setup-solana/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: Setup Solana CLI
description: Setup solana CLI
inputs:
base-path:
description: Path to the base of the repo
version:
description: Solana release version
required: false
default: .
default: "v1.18.26"
shasum:
description: SHA256 checksum of install script
required: false
default: "cec72cde1cf36eb35cd8326245d23af0b6791fab68337c2953e2ca2a40af2c50"

runs:
using: composite
steps:
Expand All @@ -14,15 +19,20 @@ runs:
with:
path: |
~/.local/share/solana
key: ${{ runner.os }}-${{ runner.arch }}-solana-cli-${{ hashFiles(format('{0}/tools/ci/install_solana', inputs.base-path)) }}
key: ${{ runner.os }}-${{ runner.arch }}-solana-cli-${{ inputs.version }}-${{ inputs.shasum }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-solana-cli-

- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
name: Install solana cli
shell: bash
working-directory: ${{ inputs.base-path }}
run: ./tools/ci/install_solana
run: |
set -euo pipefail
curl -sSfL "https://release.anza.xyz/${{ inputs.version }}/install" --output install_solana.sh
echo "${{ inputs.shasum }} install_solana.sh" | sha256sum --check
chmod +x install_solana.sh
sh -c ./install_solana.sh
rm -f install_solana.sh

- name: Export solana path to env
shell: bash
Expand Down
50 changes: 31 additions & 19 deletions .github/workflows/ccip-system-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
"The version of Chainlink repository to use for the tests. If
empty, defaults to github.sha."
default: ""
test_matrix:
required: false
type: string
description: "Pre-computed test matrix JSON"
default: ""
workflow_call:
inputs:
chainlink_image_repository_path:
Expand All @@ -57,46 +62,53 @@
"The version of Chainlink repository to use for the tests. If
empty, defaults to github.sha."
default: ""
test_matrix:
required: false
type: string
description: "Pre-computed test matrix JSON"
default: ""

jobs:
define-test-matrix:
if: inputs.test_matrix == ''
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.define-matrix.outputs.matrix }}
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v7
with:
ref: ${{ inputs.chainlink_version || github.sha }}
persist-credentials: false

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache: false

- name: Define test matrix
id: define-matrix
shell: bash
run: |
TESTS_JSON='[
{"test_name":"Test_CCIPGasPriceUpdatesWriteFrequency","timeout":"15m","selected_network":"SIMULATED_1,SIMULATED_2"},
{"test_name":"TestRMN_GlobalCurseTwoMessagesOnTwoLanes","timeout":"15m","selected_network":"SIMULATED_1,SIMULATED_2","rmn_rageproxy_version":"master-amd6416f5d86","rmn_afn2proxy_version":"master-amd64-10b42b2"},
{"test_name":"TestDeleteCCIPJobs|TestRevokeJobs","timeout":"15m","selected_network":"SIMULATED_1,SIMULATED_2","job_timeout":20}
]'

tests=$(echo "$TESTS_JSON" | jq -c \
--argjson run_id "${{ github.run_id }}" \
--arg run_attempt "${{ github.run_attempt }}" '
to_entries | map(.value + {
test_id: .key,
runs_on: ("runs-on=\($run_id)-\(.key)-\($run_attempt)/cpu=8/ram=64/family=r6i+r7i+r8i/spot=co/image=ubuntu24-full-x64/extras=s3-cache+tmpfs")
})
')

echo "matrix=$tests" | tee -a "${GITHUB_OUTPUT}"
go -C tools/ci run . matrix \
--suite='ccip' \
--run-id='${{ github.run_id }}' \
--attempt='${{ github.run_attempt }}' \
--github-output

run-ccip-tests:

Check failure on line 101 in .github/workflows/ccip-system-tests.yaml

View workflow job for this annotation

GitHub Actions / Validate Github Action Workflows

[actionlint] reported by reviewdog 🐶 could not parse as YAML: did not find expected key [syntax-check] Raw Output: e:.github/workflows/ccip-system-tests.yaml:101:4: could not parse as YAML: did not find expected key [syntax-check]
name: ${{ matrix.tests.test_name }}
permissions:
contents: read
id-token: write
needs: [define-test-matrix]
if: !failure() && !cancelled()
strategy:
fail-fast: false
matrix:
tests: ${{ fromJson(needs.define-test-matrix.outputs.matrix) }}
needs: [define-test-matrix]
tests: ${{ fromJson(inputs.test_matrix != '' && inputs.test_matrix || needs.define-test-matrix.outputs.matrix) }}
runs-on: ${{ matrix.tests.runs_on }}
environment:
# http://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/control-deployments#using-environments-without-deployments
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/changesets-preview-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ jobs:
- name: Generate new changelog
if: steps.change.outputs.core-changeset == 'true'
id: changelog
run: pnpm install && ./tools/ci/format_changelog
run: |
pnpm install
pnpm changeset version
go -C tools/ci run . changelog format
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
52 changes: 31 additions & 21 deletions .github/workflows/cre-mixed-env-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
fallback: a release/* base with no published base image is skipped (no correct
baseline vs develop); every other base (develop, or a stacked feature branch) falls
back to the develop nightly."
test_matrix:
required: false
type: string
description: "Pre-computed test matrix JSON"
default: ""
workflow_call:
inputs:
chainlink_image_repository_path:
Expand Down Expand Up @@ -101,48 +106,53 @@
fallback: a release/* base with no published base image is skipped (no correct
baseline vs develop); every other base (develop, or a stacked feature branch) falls
back to the develop nightly."
test_matrix:
required: false
type: string
description: "Pre-computed test matrix JSON"
default: ""

jobs:
define-test-matrix:
if: inputs.test_matrix == ''
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.define-matrix.outputs.matrix }}
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v7
with:
ref: ${{ inputs.chainlink_version || github.sha }}
persist-credentials: false

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache: false

- name: Define mixed-env test matrix
id: define-matrix
shell: bash
run: |
# Tests worth running under mixed-env: the OCR3/DON2DON-heavy ones.
TESTS='[
"Test_CRE_V2_Suite_Bucket_A",
"Test_CRE_V2_Suite_Bucket_B",
"Test_CRE_V2_EVM_Read_HeavyCalls",
"Test_CRE_V2_EVM_Read_StateQueries",
"Test_CRE_V2_EVM_Read_TxArtifacts"
]'
matrix=$(jq -c -n \
--argjson tests "$TESTS" \
--argjson run_id "${{ github.run_id }}" \
--arg run_attempt "${{ github.run_attempt }}" '
$tests | to_entries | map({
test_name: .value,
test_id: .key,
runs_on: "runs-on=\($run_id)-\(.key)-\($run_attempt)/cpu=16/ram=64/family=m7i+m8i/spot=co/image=ubuntu24-full-x64/extras=s3-cache+tmpfs"
})')
echo "matrix=$matrix" | tee -a "${GITHUB_OUTPUT}"
go -C tools/ci run . matrix \
--suite='cre-mixed-env' \
--run-id='${{ github.run_id }}' \
--attempt='${{ github.run_attempt }}' \
--github-output

run-mixed-env-tests:

Check failure on line 145 in .github/workflows/cre-mixed-env-tests.yaml

View workflow job for this annotation

GitHub Actions / Validate Github Action Workflows

[actionlint] reported by reviewdog 🐶 could not parse as YAML: did not find expected key [syntax-check] Raw Output: e:.github/workflows/cre-mixed-env-tests.yaml:145:4: could not parse as YAML: did not find expected key [syntax-check]
name: ${{ matrix.tests.test_name }} (mixed-env)
permissions:
contents: read
id-token: write
needs: [define-test-matrix]
if: !failure() && !cancelled()
strategy:
fail-fast: false
matrix:
tests: ${{ fromJson(needs.define-test-matrix.outputs.matrix) }}
needs: [define-test-matrix]
tests: ${{ fromJson(inputs.test_matrix != '' && inputs.test_matrix || needs.define-test-matrix.outputs.matrix) }}
runs-on: ${{ matrix.tests.runs_on }}
environment:
name: integration
Expand Down
49 changes: 25 additions & 24 deletions .github/workflows/cre-regression-system-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
"The version of Chainlink repository to use for the tests. If
empty, defaults to github.sha."
default: ""
test_matrix:
required: false
type: string
description: "Pre-computed test matrix JSON"
default: ""
workflow_call:
inputs:
chainlink_image_repository_path:
Expand All @@ -57,9 +62,15 @@
"The version of Chainlink repository to use for the tests. If
empty, defaults to github.sha."
default: ""
test_matrix:
required: false
type: string
description: "Pre-computed test matrix JSON"
default: ""

jobs:
define-test-matrix:
if: inputs.test_matrix == ''
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.define-matrix.outputs.matrix }}
Expand All @@ -72,42 +83,32 @@
ref: ${{ inputs.chainlink_version || github.sha }}
persist-credentials: false

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache: false

- name: Define test matrix
id: define-matrix
shell: bash
run: |
test_names=$(grep -rh -oP '^func \K(Test|Example)[^(]+' system-tests/tests/regression/cre/*_test.go)

per_test_configs='{
"Test_CRE_V2_Stellar_Regression": "configs/workflow-gateway-don-stellar.toml"
}'

tests=$(echo "$test_names" | jq -c -R -s \
--argjson run_id "${{ github.run_id }}" \
--arg run_attempt "${{ github.run_attempt }}" \
--argjson per "$per_test_configs" '
split("\n") | map(select(length>0))
| to_entries
| map({
test_name: .value,
test_id: .key,
runs_on: "runs-on=\($run_id)-\(.key)-\($run_attempt)/cpu=16/ram=64/family=m7i+m8i/spot=co/image=ubuntu24-full-x64/extras=s3-cache+tmpfs",
configs: ($per[.value] // "configs/workflow-gateway-capabilities-don.toml")
})
')

echo "matrix=$tests" | tee -a "${GITHUB_OUTPUT}"
go -C tools/ci run . matrix \
--suite='cre-regression' \
--run-id='${{ github.run_id }}' \
--attempt='${{ github.run_attempt }}' \
--github-output

run-system-tests:

Check failure on line 101 in .github/workflows/cre-regression-system-tests.yaml

View workflow job for this annotation

GitHub Actions / Validate Github Action Workflows

[actionlint] reported by reviewdog 🐶 could not parse as YAML: did not find expected key [syntax-check] Raw Output: e:.github/workflows/cre-regression-system-tests.yaml:101:4: could not parse as YAML: did not find expected key [syntax-check]
name: ${{ matrix.tests.test_name }} ${{ matrix.tests.topology != '' && format(' ({0})', matrix.tests.topology) || '' }}
permissions:
contents: read
id-token: write
needs: [define-test-matrix]
if: !failure() && !cancelled()
strategy:
fail-fast: false
matrix:
tests: ${{fromJson(needs.define-test-matrix.outputs.matrix)}}
needs: [define-test-matrix]
tests: ${{ fromJson(inputs.test_matrix != '' && inputs.test_matrix || needs.define-test-matrix.outputs.matrix) }}
# we need a `test_id` and `run_attempt` here to stop runner stealing
# see: https://runs-on.com/guides/troubleshoot/#runner-stealing-and-matrix-jobs
runs-on: ${{ matrix.tests.runs_on }}
Expand Down
Loading
Loading