-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
10 additions
and
162 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -179,23 +179,13 @@ jobs: | |
run: | | ||
echo "TIMEOUT=10m" >> $GITHUB_ENV | ||
echo "COUNT=50" >> $GITHUB_ENV | ||
- name: Install gotestloghelper | ||
if: ${{ needs.filter.outputs.changes == 'true' }} | ||
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/[email protected] | ||
- name: Run tests | ||
if: ${{ needs.filter.outputs.changes == 'true' }} | ||
id: run-tests | ||
env: | ||
OUTPUT_FILE: ./output.txt | ||
USE_TEE: false | ||
CL_DATABASE_URL: ${{ env.DB_URL }} | ||
run: ./tools/bin/${{ matrix.type.cmd }} ./... | ||
- name: Print Filtered Test Results | ||
if: ${{ failure() && needs.filter.outputs.changes == 'true' && steps.run-tests.conclusion == 'failure' }} | ||
run: | | ||
if [[ "${{ matrix.type.printResults }}" == "true" ]]; then | ||
cat output.txt | gotestloghelper -ci | ||
fi | ||
- name: Print Races | ||
id: print-races | ||
if: ${{ failure() && matrix.type.cmd == 'go_core_race_tests' && needs.filter.outputs.changes == 'true' }} | ||
|
@@ -243,94 +233,6 @@ jobs: | |
echo "path_output=${resultsFile}" >> $GITHUB_OUTPUT | ||
fi | ||
detect-flakey-tests: | ||
needs: [filter, core] | ||
name: Flakey Test Detection | ||
runs-on: ubuntu-latest | ||
if: ${{ always() && github.actor != 'dependabot[bot]' }} | ||
env: | ||
CL_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/[email protected] | ||
- name: Setup node | ||
if: ${{ needs.filter.outputs.changes == 'true' }} | ||
uses: actions/[email protected] | ||
- name: Setup NodeJS | ||
if: ${{ needs.filter.outputs.changes == 'true' }} | ||
uses: ./.github/actions/setup-nodejs | ||
with: | ||
prod: "true" | ||
- name: Setup Go | ||
if: ${{ needs.filter.outputs.changes == 'true' }} | ||
uses: ./.github/actions/setup-go | ||
- name: Setup Postgres | ||
if: ${{ needs.filter.outputs.changes == 'true' }} | ||
uses: ./.github/actions/setup-postgres | ||
- name: Touching core/web/assets/index.html | ||
if: ${{ needs.filter.outputs.changes == 'true' }} | ||
run: mkdir -p core/web/assets && touch core/web/assets/index.html | ||
- name: Download Go vendor packages | ||
if: ${{ needs.filter.outputs.changes == 'true' }} | ||
run: go mod download | ||
- name: Replace chainlink-evm deps | ||
if: ${{ needs.filter.outputs.changes == 'true' && inputs.evm-ref != ''}} | ||
shell: bash | ||
run: go get github.com/smartcontractkit/chainlink-integrations/evm/relayer@${{ inputs.evm-ref }} | ||
- name: Build binary | ||
if: ${{ needs.filter.outputs.changes == 'true' }} | ||
run: go build -o chainlink.test . | ||
- name: Setup DB | ||
if: ${{ needs.filter.outputs.changes == 'true' }} | ||
run: ./chainlink.test local db preparetest | ||
- name: Load test outputs | ||
if: ${{ needs.filter.outputs.changes == 'true' }} | ||
uses: actions/[email protected] | ||
with: | ||
name: go_core_tests_logs | ||
path: ./artifacts | ||
- name: Delete go_core_tests_logs/coverage.txt | ||
if: ${{ needs.filter.outputs.changes == 'true' }} | ||
shell: bash | ||
run: | | ||
# Need to delete coverage.txt so the disk doesn't fill up | ||
rm -f ./artifacts/go_core_tests_logs/coverage.txt | ||
- name: Build flakey test runner | ||
if: ${{ needs.filter.outputs.changes == 'true' }} | ||
run: go build ./tools/flakeytests/cmd/runner | ||
- name: Re-run tests | ||
if: ${{ needs.filter.outputs.changes == 'true' }} | ||
env: | ||
GRAFANA_INTERNAL_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | ||
GRAFANA_INTERNAL_HOST: ${{ secrets.GRAFANA_INTERNAL_HOST }} | ||
GRAFANA_INTERNAL_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | ||
GITHUB_EVENT_PATH: ${{ github.event_path }} | ||
GITHUB_EVENT_NAME: ${{ github.event_name }} | ||
GITHUB_REPO: ${{ github.repository }} | ||
GITHUB_RUN_ID: ${{ github.run_id }} | ||
run: | | ||
./runner \ | ||
-grafana_auth=$GRAFANA_INTERNAL_BASIC_AUTH \ | ||
-grafana_host=$GRAFANA_INTERNAL_HOST \ | ||
-grafana_org_id=$GRAFANA_INTERNAL_TENANT_ID \ | ||
-gh_sha=$GITHUB_SHA \ | ||
-gh_event_path=$GITHUB_EVENT_PATH \ | ||
-gh_event_name=$GITHUB_EVENT_NAME \ | ||
-gh_run_id=$GITHUB_RUN_ID \ | ||
-gh_repo=$GITHUB_REPO \ | ||
-command=./tools/bin/go_core_tests \ | ||
`ls -R ./artifacts/output.txt` | ||
- name: Store logs artifacts | ||
if: ${{ needs.filter.outputs.changes == 'true' && always() }} | ||
uses: actions/[email protected] | ||
with: | ||
name: flakey_test_runner_logs | ||
path: | | ||
./output.txt | ||
scan: | ||
name: SonarQube Scan | ||
needs: [core] | ||
|
This file contains 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 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 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 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 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 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