Skip to content
Draft
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
62 changes: 59 additions & 3 deletions .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,14 @@
required: false
type: number
default: 60
prebuilt_e2e_test_binaries_artifact:
description: |
When non-empty, the name of a workflow artifact (uploaded by the caller) that
contains e2e-test-binaries.tar.gz produced from integration-tests/.e2e-test-bin.
Matrix jobs extract it and run tests via precompiled binaries (see e2e-tests.yml).
required: false
type: string
default: ""
outputs:
test_results:
description: "Test results from all executed tests"
Expand Down Expand Up @@ -391,7 +399,7 @@
environment:
name: integration
# http://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/control-deployments#using-environments-without-deployments
deployment: false

Check failure on line 402 in .github/workflows/run-e2e-tests.yml

View workflow job for this annotation

GitHub Actions / ci-lint-misc

[actionlint] reported by reviewdog 🐶 unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check] Raw Output: e:.github/workflows/run-e2e-tests.yml:402:7: unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check]
outputs:
latest_chainlink_release_version: ${{ steps.get_latest_version.outputs.latest_version }}
steps:
Expand Down Expand Up @@ -608,7 +616,7 @@
environment:
name: integration
# http://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/control-deployments#using-environments-without-deployments
deployment: false

Check failure on line 619 in .github/workflows/run-e2e-tests.yml

View workflow job for this annotation

GitHub Actions / ci-lint-misc

[actionlint] reported by reviewdog 🐶 unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check] Raw Output: e:.github/workflows/run-e2e-tests.yml:619:7: unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check]
permissions:
id-token: write
contents: read
Expand Down Expand Up @@ -661,7 +669,7 @@
environment:
name: integration
# http://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/control-deployments#using-environments-without-deployments
deployment: false

Check failure on line 672 in .github/workflows/run-e2e-tests.yml

View workflow job for this annotation

GitHub Actions / ci-lint-misc

[actionlint] reported by reviewdog 🐶 unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check] Raw Output: e:.github/workflows/run-e2e-tests.yml:672:7: unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check]
permissions:
id-token: write
contents: read
Expand Down Expand Up @@ -712,7 +720,7 @@
environment:
name: integration
# http://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/control-deployments#using-environments-without-deployments
deployment: false

Check failure on line 723 in .github/workflows/run-e2e-tests.yml

View workflow job for this annotation

GitHub Actions / ci-lint-misc

[actionlint] reported by reviewdog 🐶 unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check] Raw Output: e:.github/workflows/run-e2e-tests.yml:723:7: unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check]
permissions:
actions: read
checks: write
Expand Down Expand Up @@ -747,6 +755,21 @@
persist-credentials: false
ref: ${{ inputs.chainlink_version }}

- name: Download prebuilt E2E test binaries
if: inputs.prebuilt_e2e_test_binaries_artifact != ''
uses: actions/download-artifact@v4

Check warning on line 760 in .github/workflows/run-e2e-tests.yml

View workflow job for this annotation

GitHub Actions / Validate Workflow Changes

1. Action is using node20. Versions older than node24 are being deprecated. Use a newer version of the action if possible. (node-version / warning)
with:
name: ${{ inputs.prebuilt_e2e_test_binaries_artifact }}
path: downloaded-e2e-bins

- name: Extract prebuilt E2E test binaries
if: inputs.prebuilt_e2e_test_binaries_artifact != ''
shell: bash
run: |
tar xzf downloaded-e2e-bins/e2e-test-binaries.tar.gz -C integration-tests
find integration-tests/.e2e-test-bin -name '*.test' -exec chmod +x {} \;
echo "PREBUILT_E2E_BINARIES=true" >> "$GITHUB_ENV"

- name: Show test config override path in summary
if: ${{ env.TEST_CONFIG_OVERRIDE_PATH }}
shell: bash
Expand Down Expand Up @@ -852,7 +875,7 @@
- name: Run tests
id: run_tests
timeout-minutes: ${{ matrix.tests.timeout_minutes || inputs.test-timeout-minutes }}
uses: smartcontractkit/.github/actions/ctf-run-tests@ctf-run-tests/0.11.0
uses: smartcontractkit/.github/actions/ctf-run-tests@fd6d3af35a8d36bff54eac8babde688c31fd39cf

Check warning on line 878 in .github/workflows/run-e2e-tests.yml

View workflow job for this annotation

GitHub Actions / Validate Workflow Changes

1. Trusted actions should use a major version tag, if available. (trusted-tag-ref / warning)
# jankiness because: github.com/actions/runner/issues/1492 + github.com/actions/runner/issues/2418
continue-on-error: ${{ fromJSON(env.QUARANTINE) }}
env:
Expand All @@ -877,6 +900,7 @@
test_go_project_path: ${{ matrix.tests.test_go_project_path }}
test_command_to_run: ${{ matrix.tests.test_cmd }} ${{ matrix.tests.test_cmd_opts }}
test_download_vendor_packages_command: cd $(dirname ${{ matrix.tests.path }}) && go mod download
skip_go_modules_download: ${{ inputs.prebuilt_e2e_test_binaries_artifact != '' && 'true' || 'false' }}
test_secrets_override_base64: ${{ steps.aws-test-secrets.outputs.secret_value ||
secrets.TEST_SECRETS_OVERRIDE_BASE64 }}
test_config_override_path: ${{ env.TEST_CONFIG_OVERRIDE_PATH }}
Expand Down Expand Up @@ -1019,7 +1043,7 @@
environment:
name: integration
# http://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/control-deployments#using-environments-without-deployments
deployment: false

Check failure on line 1046 in .github/workflows/run-e2e-tests.yml

View workflow job for this annotation

GitHub Actions / ci-lint-misc

[actionlint] reported by reviewdog 🐶 unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check] Raw Output: e:.github/workflows/run-e2e-tests.yml:1046:7: unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check]
permissions:
actions: read
checks: write
Expand Down Expand Up @@ -1080,7 +1104,7 @@
environment:
name: integration
# http://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/control-deployments#using-environments-without-deployments
deployment: false

Check failure on line 1107 in .github/workflows/run-e2e-tests.yml

View workflow job for this annotation

GitHub Actions / ci-lint-misc

[actionlint] reported by reviewdog 🐶 unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check] Raw Output: e:.github/workflows/run-e2e-tests.yml:1107:7: unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check]
permissions:
actions: read
checks: write
Expand Down Expand Up @@ -1114,6 +1138,21 @@
with:
persist-credentials: false

- name: Download prebuilt E2E test binaries
if: inputs.prebuilt_e2e_test_binaries_artifact != ''
uses: actions/download-artifact@v4

Check warning on line 1143 in .github/workflows/run-e2e-tests.yml

View workflow job for this annotation

GitHub Actions / Validate Workflow Changes

1. Action is using node20. Versions older than node24 are being deprecated. Use a newer version of the action if possible. (node-version / warning)
with:
name: ${{ inputs.prebuilt_e2e_test_binaries_artifact }}
path: downloaded-e2e-bins

- name: Extract prebuilt E2E test binaries
if: inputs.prebuilt_e2e_test_binaries_artifact != ''
shell: bash
run: |
tar xzf downloaded-e2e-bins/e2e-test-binaries.tar.gz -C integration-tests
find integration-tests/.e2e-test-bin -name '*.test' -exec chmod +x {} \;
echo "PREBUILT_E2E_BINARIES=true" >> "$GITHUB_ENV"

- name: Show test config override path in summary
if: ${{ env.TEST_CONFIG_OVERRIDE_PATH }}
run: |
Expand Down Expand Up @@ -1171,7 +1210,7 @@
- name: Run tests
id: run_tests
timeout-minutes: ${{ matrix.tests.timeout_minutes || inputs.test-timeout-minutes }}
uses: smartcontractkit/.github/actions/ctf-run-tests@ctf-run-tests/0.11.0
uses: smartcontractkit/.github/actions/ctf-run-tests@fd6d3af35a8d36bff54eac8babde688c31fd39cf

Check warning on line 1213 in .github/workflows/run-e2e-tests.yml

View workflow job for this annotation

GitHub Actions / Validate Workflow Changes

1. Trusted actions should use a major version tag, if available. (trusted-tag-ref / warning)
# jankiness because: github.com/actions/runner/issues/1492 + github.com/actions/runner/issues/2418
continue-on-error: ${{ fromJSON(env.QUARANTINE) }}
env:
Expand Down Expand Up @@ -1203,6 +1242,7 @@
with:
test_command_to_run: ${{ matrix.tests.test_cmd }} ${{ matrix.tests.test_cmd_opts }}
test_download_vendor_packages_command: make gomod
skip_go_modules_download: ${{ inputs.prebuilt_e2e_test_binaries_artifact != '' && 'true' || 'false' }}
test_secrets_override_base64: ${{ steps.aws-test-secrets.outputs.secret_value ||
secrets.TEST_SECRETS_OVERRIDE_BASE64 }}
test_config_override_path: ${{ env.TEST_CONFIG_OVERRIDE_PATH }}
Expand Down Expand Up @@ -1287,7 +1327,7 @@
environment:
name: integration
# http://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/control-deployments#using-environments-without-deployments
deployment: false

Check failure on line 1330 in .github/workflows/run-e2e-tests.yml

View workflow job for this annotation

GitHub Actions / ci-lint-misc

[actionlint] reported by reviewdog 🐶 unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check] Raw Output: e:.github/workflows/run-e2e-tests.yml:1330:7: unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check]
permissions:
actions: read
checks: write
Expand Down Expand Up @@ -1316,6 +1356,21 @@
with:
persist-credentials: false

- name: Download prebuilt E2E test binaries
if: inputs.prebuilt_e2e_test_binaries_artifact != ''
uses: actions/download-artifact@v4

Check warning on line 1361 in .github/workflows/run-e2e-tests.yml

View workflow job for this annotation

GitHub Actions / Validate Workflow Changes

1. Action is using node20. Versions older than node24 are being deprecated. Use a newer version of the action if possible. (node-version / warning)
with:
name: ${{ inputs.prebuilt_e2e_test_binaries_artifact }}
path: downloaded-e2e-bins

- name: Extract prebuilt E2E test binaries
if: inputs.prebuilt_e2e_test_binaries_artifact != ''
shell: bash
run: |
tar xzf downloaded-e2e-bins/e2e-test-binaries.tar.gz -C integration-tests
find integration-tests/.e2e-test-bin -name '*.test' -exec chmod +x {} \;
echo "PREBUILT_E2E_BINARIES=true" >> "$GITHUB_ENV"

- name: Set dynamic env vars for tests
shell: bash
run: |
Expand All @@ -1342,7 +1397,7 @@
- name: Run tests
id: run_tests
timeout-minutes: ${{ matrix.tests.timeout_minutes || inputs.test-timeout-minutes }}
uses: smartcontractkit/.github/actions/ctf-run-tests@ctf-run-tests/0.11.0
uses: smartcontractkit/.github/actions/ctf-run-tests@fd6d3af35a8d36bff54eac8babde688c31fd39cf
# jankiness because: github.com/actions/runner/issues/1492 + github.com/actions/runner/issues/2418
continue-on-error: ${{ fromJSON(env.QUARANTINE) }}
env:
Expand All @@ -1351,6 +1406,7 @@
test_go_project_path: ${{ matrix.tests.test_go_project_path }}
test_command_to_run: ${{ matrix.tests.test_cmd }} ${{ matrix.tests.test_cmd_opts }}
test_download_vendor_packages_command: cd $(dirname ${{ matrix.tests.path }}) && go mod download
skip_go_modules_download: ${{ inputs.prebuilt_e2e_test_binaries_artifact != '' && 'true' || 'false' }}
test_type: ${{ matrix.tests.test_env_vars.TEST_TYPE }}
test_suite: ${{ matrix.tests.test_env_vars.TEST_SUITE }}
artifacts_name: ${{ env.TEST_ID }}-test-logs
Expand Down Expand Up @@ -1408,7 +1464,7 @@
environment:
name: integration
# http://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/control-deployments#using-environments-without-deployments
deployment: false

Check failure on line 1467 in .github/workflows/run-e2e-tests.yml

View workflow job for this annotation

GitHub Actions / ci-lint-misc

[actionlint] reported by reviewdog 🐶 unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check] Raw Output: e:.github/workflows/run-e2e-tests.yml:1467:7: unexpected key "deployment" for "environment" section. expected one of "name", "url" [syntax-check]
outputs:
test_results: ${{ steps.set_test_results.outputs.results }}
steps:
Expand Down
10 changes: 10 additions & 0 deletions actions/ctf-run-tests/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# ctf-run-tests

## 0.13.0

### Minor Changes

- Add optional inputs `go_necessary` and `skip_go_modules_download` for workflows that run
precompiled `go test -c` binaries (for example E2E matrix jobs). When
`skip_go_modules_download` is true, module download is skipped while Go remains available
for `gotestsum` / `gotestloghelper`. Use `gotestsum --raw-command -- ./pkg.test -test.json ...`
in `test_command_to_run` for test2json output.

## 0.12.0

### Minor Changes
Expand Down
4 changes: 4 additions & 0 deletions actions/ctf-run-tests/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# ctf-run-tests

> Common runner for chainlink-testing-framework based tests

Precompiled tests: set `skip_go_modules_download` to skip `go mod download`, and pass a
`test_command_to_run` that uses `gotestsum --raw-command -- /path/to/pkg.test -test.v -test.json …`
so junit/json output still works.
15 changes: 14 additions & 1 deletion actions/ctf-run-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,18 @@ inputs:
description: |
Whether to setup the database before running the tests. Typically used for in-memory tests.
default: "false"
go_necessary:
required: false
description: |
Whether to install Go and run module download (via test_download_vendor_packages_command).
Set to "false" only if the runner already has a compatible Go toolchain and modules are not needed.
default: "true"
skip_go_modules_download:
required: false
description: |
When "true", replaces the module download step with a no-op. Use with precompiled test
binaries; Go is still installed for gotestsum/gotestloghelper unless go_necessary is false.
default: "false"

runs:
using: composite
Expand All @@ -231,9 +243,10 @@ runs:
uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@ctf-setup-run-tests-environment/0.8.0
with:
test_download_vendor_packages_command:
${{ inputs.test_download_vendor_packages_command }}
${{ inputs.skip_go_modules_download == 'true' && 'echo Skipping go mod download \(prebuilt E2E binaries\); true' || inputs.test_download_vendor_packages_command }}
go_version: ${{ inputs.go_version }}
go_mod_path: ${{ inputs.go_mod_path }}
go_necessary: ${{ inputs.go_necessary }}
cache_restore_only: ${{ inputs.cache_restore_only }}
cache_key_id: ${{ inputs.cache_key_id }}
aws_registries: ${{ inputs.aws_registries }}
Expand Down
2 changes: 1 addition & 1 deletion actions/ctf-run-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ctf-run-tests",
"version": "0.12.0",
"version": "0.13.0",
"description": "",
"private": true,
"scripts": {},
Expand Down
Loading