Skip to content

Commit

Permalink
feat: combine core unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erikburt committed Nov 26, 2024
1 parent 173d65c commit 2bb799b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 39 deletions.
24 changes: 1 addition & 23 deletions .github/actions/setup-ci-core-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,9 @@ inputs:
The expected database URL
required: true

build-only:
description: |
Only setup the necessary dependencies for building the binary
default: "false"

runs:
using: composite
steps:
- name: Log Start
shell: bash
run: |
echo "===================================="
echo "Setting up CI Core Tests Environment"
echo "===================================="
- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs
with:
Expand All @@ -46,7 +34,7 @@ runs:
- name: Replace chainlink-evm deps
if: ${{ inputs.evm-ref-override != ''}}
shell: bash
run: go get github.com/smartcontractkit/chainlink-integrations/evm/relayer@${{ inputs.evm-ref }}
run: go get github.com/smartcontractkit/chainlink-integrations/evm/relayer@${{ inputs.evm-ref-override }}

- name: Setup Solana
uses: ./.github/actions/setup-solana
Expand All @@ -55,11 +43,9 @@ runs:
uses: ./.github/actions/setup-wasmd

- name: Setup Postgres
if: ${{ inputs.build-only == 'false' }}
uses: ./.github/actions/setup-postgres

- name: Touching core/web/assets/index.html
if: ${{ inputs.build-only == 'false' }}
shell: bash
run: mkdir -p core/web/assets && touch core/web/assets/index.html

Expand All @@ -74,12 +60,10 @@ runs:
run: go mod download

- name: Build binary
if: ${{ inputs.build-only == 'false' }}
shell: bash
run: go build -o chainlink.test .

- name: Setup DB
if: ${{ inputs.build-only == 'false' }}
shell: bash
run: ./chainlink.test local db preparetest
env:
Expand All @@ -101,9 +85,3 @@ runs:
go install ./pkg/chainlink/cmd/chainlink-starknet
popd
- name: Log End
shell: bash
run: |
echo "============================================="
echo "Finished Setting up CI Core Tests Environment"
echo "============================================="
21 changes: 5 additions & 16 deletions .github/workflows/ci-core-partial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ jobs:
matrix:
type:
- test-suite: "core"
tag-filter: ""
module-directory: "./"
- test-suite: "integration"
tag-filter: "integration"
module-directory: "./"
build-flags: "-tags=integration"
- test-suite: "ccip-deployment"
tag-filter: ""
module-directory: "./deployment"
Expand All @@ -38,11 +35,6 @@ jobs:
- name: Checkout the repo
uses: actions/checkout@v4.2.1

- name: Change Modtime of Files (cache optimization)
shell: bash
run: |
find . -type f,d -exec touch -r {} -d '1970-01-01T00:00:01' {} \; || true
- name: Setup CI Core Environment
uses: ./.github/actions/setup-ci-core-tests
with:
Expand All @@ -53,10 +45,9 @@ jobs:
uses: smartcontractkit/.github/apps/go-test-caching@feat/go-test-binary-comparison
with:
pipeline-step: "build"
build-concurrency: "32"
test-suite: ${{ matrix.type.test-suite }}
module-directory: ${{ matrix.type.module-directory }}
tag-filter: ${{ matrix.type.tag-filter }}
build-concurrency: "32"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Run Tests
Expand All @@ -65,21 +56,19 @@ jobs:
CL_DATABASE_URL: ${{ env.DB_URL }}
with:
pipeline-step: "run"
run-all-tests: "true"
run-concurrency: "16"
test-suite: ${{ matrix.type.test-suite }}
module-directory: ${{ matrix.type.module-directory }}
tag-filter: ${{ matrix.type.tag-filter }}
github-token: ${{ secrets.GITHUB_TOKEN }}
run-all-tests: "true"
run-concurrency: "32"

- name: Update Test Index
uses: smartcontractkit/.github/apps/go-test-caching@feat/go-test-binary-comparison
with:
pipeline-step: "update"
force-update-index: "true"
test-suite: ${{ matrix.type.test-suite }}
module-directory: ${{ matrix.type.module-directory }}
tag-filter: ${{ matrix.type.tag-filter }}
run-concurrency: "32"
github-token: ${{ secrets.GITHUB_TOKEN }}


Expand Down

0 comments on commit 2bb799b

Please sign in to comment.