-
Notifications
You must be signed in to change notification settings - Fork 54
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
1 parent
55098f5
commit 7e16199
Showing
4 changed files
with
18 additions
and
50 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 |
---|---|---|
|
@@ -258,66 +258,53 @@ jobs: | |
needs: [filter, core] | ||
name: Flakey Test Detection | ||
runs-on: ubuntu-latest | ||
if: ${{ always() && github.actor != 'dependabot[bot]' }} | ||
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} | ||
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/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
uses: actions/checkout@v4.2.1 | ||
- name: Setup node | ||
if: ${{ needs.filter.outputs.changes == 'true' }} | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
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 != ''}} | ||
if: ${{ github.event_name == 'workflow_dispatch' && 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/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 | ||
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 }} | ||
|
@@ -334,12 +321,13 @@ jobs: | |
-command=./tools/bin/go_core_tests \ | ||
`ls -R ./artifacts/output.txt` | ||
- name: Store logs artifacts | ||
if: ${{ needs.filter.outputs.changes == 'true' && always() }} | ||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v4.4.3 | ||
with: | ||
name: flakey_test_runner_logs | ||
path: | | ||
./output.txt | ||
retention-days: 7 | ||
|
||
scan: | ||
name: SonarQube Scan | ||
|
@@ -348,11 +336,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
uses: actions/checkout@v4.2.1 | ||
with: | ||
fetch-depth: 0 # fetches all history for all tags and branches to provide more metadata for sonar reports | ||
- name: Download all workflow run artifacts | ||
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 | ||
uses: actions/[email protected].8 | ||
|
||
- name: Check and Set SonarQube Report Paths | ||
shell: bash | ||
|
@@ -407,19 +395,6 @@ jobs: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | ||
SONAR_SCANNER_OPTS: "-Xms6g -Xmx8g" | ||
|
||
- name: Collect Metrics | ||
if: always() | ||
id: collect-gha-metrics | ||
uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 | ||
with: | ||
id: ci-core-sonarqube | ||
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | ||
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | ||
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} | ||
this-job-name: SonarQube Scan | ||
continue-on-error: true | ||
|
||
clean: | ||
name: Clean Go Tidy & Generate | ||
if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') && github.actor != 'dependabot[bot]' }} | ||
|
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