split windows CI tests into parts (#485)

* setup to use env variable for parallel tests
* use explicit targets
* use target in includes
* test windows split
* try simpler logic
* only use include in ci.yml
* add cpu
* fix name
* re-add unit tests!
* restore coverage
* not sure why env broke there
* startup node for part 1 & 2 tests
* fixup part 1 & 2 tests
* split windows into 3!
This commit is contained in:
Jaremy Creechley 2023-07-19 16:00:34 -07:00 committed by GitHub
parent 113f7cccc1
commit 8bebc90428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 2 deletions

View File

@ -12,23 +12,38 @@ jobs:
build: build:
strategy: strategy:
matrix: matrix:
os: [linux, macos, windows]
include: include:
- os: linux - os: linux
cpu: amd64
builder: ubuntu-latest builder: ubuntu-latest
shell: bash --noprofile --norc -e -o pipefail shell: bash --noprofile --norc -e -o pipefail
tests: all
- os: macos - os: macos
cpu: amd64
builder: macos-latest builder: macos-latest
shell: bash --noprofile --norc -e -o pipefail shell: bash --noprofile --norc -e -o pipefail
tests: all
- os: windows - os: windows
cpu: amd64
builder: windows-latest builder: windows-latest
shell: msys2 shell: msys2
tests: unittest
- os: windows
cpu: amd64
builder: windows-latest
shell: msys2
tests: contract
- os: windows
cpu: amd64
builder: windows-latest
shell: msys2
tests: integration
defaults: defaults:
run: run:
shell: ${{ matrix.shell }} {0} shell: ${{ matrix.shell }} {0}
name: '${{ matrix.os }}' name: '${{ matrix.os }}-${{ matrix.cpu }}-tests-${{ matrix.tests }}'
runs-on: ${{ matrix.builder }} runs-on: ${{ matrix.builder }}
timeout-minutes: 80 timeout-minutes: 80
steps: steps:
@ -44,7 +59,9 @@ jobs:
shell: ${{ matrix.shell }} shell: ${{ matrix.shell }}
nim_version: ${{ env.nim_version }} nim_version: ${{ env.nim_version }}
## Part 1 Tests ##
- name: Unit tests - name: Unit tests
if: matrix.tests == 'unittest' || matrix.tests == 'all'
run: make -j${ncpu} test run: make -j${ncpu} test
# workaround for https://github.com/NomicFoundation/hardhat/issues/3877 # workaround for https://github.com/NomicFoundation/hardhat/issues/3877
@ -54,6 +71,7 @@ jobs:
node-version: 18.15 node-version: 18.15
- name: Start Ethereum node with Codex contracts - name: Start Ethereum node with Codex contracts
if: matrix.tests == 'contract' || matrix.tests == 'integration' || matrix.tests == 'all'
working-directory: vendor/codex-contracts-eth working-directory: vendor/codex-contracts-eth
env: env:
MSYS2_PATH_TYPE: inherit MSYS2_PATH_TYPE: inherit
@ -61,10 +79,14 @@ jobs:
npm install npm install
npm start & npm start &
## Part 2 Tests ##
- name: Contract tests - name: Contract tests
if: matrix.tests == 'contract' || matrix.tests == 'all'
run: make -j${ncpu} testContracts run: make -j${ncpu} testContracts
## Part 3 Tests ##
- name: Integration tests - name: Integration tests
if: matrix.tests == 'integration' || matrix.tests == 'all'
run: make -j${ncpu} testIntegration run: make -j${ncpu} testIntegration
coverage: coverage: