Skip to content

Commit

Permalink
feat(ci): Split all tests to different jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimo99 committed Jun 29, 2023
1 parent 14f5145 commit 3c3ee52
Showing 1 changed file with 190 additions and 12 deletions.
202 changes: 190 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,16 @@ env:
ETHERSCAN_API_KEY: '${{ secrets.ETHERSCAN_API_KEY }}'

jobs:
Tests:
Setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.11
install_url: https://releases.nixos.org/nix/nix-2.15.0/install

- uses: cachix/cachix-action@v12
with:
name: nix-blockchain-development
Expand All @@ -34,44 +32,224 @@ jobs:
- name: Build Nix dev shell
run: ./scripts/build-nix-shell.sh

- name: Install Node.js dependencies
run: nix develop -c yarn install --immutable
EOS_Relayer_Test:
needs: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.11
install_url: https://releases.nixos.org/nix/nix-2.15.0/install

- uses: cachix/cachix-action@v12
with:
name: nix-blockchain-development
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Install Node.js dependencies
run: nix develop -c yarn format:check
run: nix develop -c yarn install --immutable

- name: Run Verifier in EOS - Relayer test
run: nix develop -c yarn test './tests/eosLightClient/test-verifier-in-EOS-relay.ts'

Nim_Light_Client_Compiled_with_Emsctipten_Tests:
needs: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.11
install_url: https://releases.nixos.org/nix/nix-2.15.0/install

- uses: cachix/cachix-action@v12
with:
name: nix-blockchain-development
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Install Node.js dependencies
run: nix develop -c yarn install --immutable

- name: Run Nim Light Client compiled with emsctipten tests
run: nix develop -c yarn test-emcc './tests/test-nim-to-wasm.ts' 'test-nim-light-client.ts'

Nim_Light_Client_Clang_Test:
needs: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.11
install_url: https://releases.nixos.org/nix/nix-2.15.0/install

- uses: cachix/cachix-action@v12
with:
name: nix-blockchain-development
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Install Node.js dependencies
run: nix develop -c yarn install --immutable

- name: Run Nim Light Client compiled with clang tests
run: nix develop -c yarn test './tests/test-nim-to-wasm.ts' 'test-nim-light-client.ts'

Nim_Groth16_Verifier_Tests:
needs: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.11
install_url: https://releases.nixos.org/nix/nix-2.15.0/install

- uses: cachix/cachix-action@v12
with:
name: nix-blockchain-development
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Install Node.js dependencies
run: nix develop -c yarn install --immutable

- name: Run Nim groth16 verifier tests
run: nix develop -c make test-groth16-verifier

Run_Light_Client_In_Cosmos_Test:
needs: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.11
install_url: https://releases.nixos.org/nix/nix-2.15.0/install

- uses: cachix/cachix-action@v12
with:
name: nix-blockchain-development
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Install Node.js dependencies
run: nix develop -c yarn install --immutable

- name: Run Light Client in Cosmos test
run: nix develop -c yarn test './tests/cosmosLightClient/test-nim-light-client-in-cosmos.ts'

Run_Verifier_In_Cosmos_Test:
needs: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.11
install_url: https://releases.nixos.org/nix/nix-2.15.0/install

- uses: cachix/cachix-action@v12
with:
name: nix-blockchain-development
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Install Node.js dependencies
run: nix develop -c yarn install --immutable

- name: Run Verifier in Cosmos test
run: nix develop -c yarn test './tests/cosmosLightClient/test-verifier-in-cosmos.ts'

Run_Circom_Tests:
needs: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.11
install_url: https://releases.nixos.org/nix/nix-2.15.0/install

- uses: cachix/cachix-action@v12
with:
name: nix-blockchain-development
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Install Node.js dependencies
run: nix develop -c yarn install --immutable

- name: Run circom tests
run: nix develop -c make test-circom-circuits

Run_Verifier_In_Cosmos_Relay_Tests:
needs: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.11
install_url: https://releases.nixos.org/nix/nix-2.15.0/install

- uses: cachix/cachix-action@v12
with:
name: nix-blockchain-development
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Install Node.js dependencies
run: nix develop -c yarn install --immutable

- name: Run Verifier in Cosmos - Relayer test
run: nix develop -c yarn test './tests/cosmosLightClient/test-verifier-in-cosmos-relay.ts'

# - name: Run Verifier in EOS test
# run: nix develop -c yarn test './tests/eosLightClient/test-verifier-in-EOS.ts'
Run_Verify_Given_Proof:
needs: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.11
install_url: https://releases.nixos.org/nix/nix-2.15.0/install

- uses: cachix/cachix-action@v12
with:
name: nix-blockchain-development
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Install Node.js dependencies
run: nix develop -c yarn install --immutable

- name: Run Verify given proof - test using bncurve and constantine
run: nix develop -c nim c -r 'tests/verify_proof/verify_given_proof_test.nim'

SolidityVerifierTests:
needs: Tests
Solidity_Verifier_Tests:
needs: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -94,8 +272,8 @@ jobs:
- name: Run Solidity verifier tests
run: nix develop -c make evm-simulation

OneShotSyncingSimulation:
needs: Tests
OneShot_Syncing_Simulation:
needs: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 3c3ee52

Please sign in to comment.