Skip to content

Commit

Permalink
Rearrange build steps to avoid creating fake artefacts
Browse files Browse the repository at this point in the history
  • Loading branch information
LogvinovLeon committed Feb 14, 2024
1 parent bb6b0db commit bf59947
Showing 1 changed file with 11 additions and 25 deletions.
36 changes: 11 additions & 25 deletions .github/workflows/ts_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,6 @@ jobs:
- name: Install Dependencies
run: yarn install

# We don't store circuit and smart contract compilation artefacts in the repo,
# but typecheck fails on import without them so we just create fake files here
- name: Create fake circuit compilation artefacts
working-directory: .
run: |
mkdir -p target
touch target/ethereum_history_api.json
- name: Create fake smart contract build artefacts
working-directory: .
run: |
mkdir -p ethereum_history_api/contracts/out/UltraVerifier.sol
echo '{ "abi": [], "bytecode": { "object": "" } }' > ethereum_history_api/contracts/out/UltraVerifier.sol/UltraVerifier.json
- name: Run TypeScript Build
run: yarn build:all

- name: Run Unit Tests
working-directory: ethereum_history_api/oracles
run: yarn test:unit

- name: Install Nargo
uses: noir-lang/[email protected]
with:
Expand All @@ -74,16 +53,23 @@ jobs:
with:
version: nightly

- name: Compile Smart Contract
working-directory: ethereum_history_api/contracts
run: forge build

- name: Run TypeScript Build
run: yarn build:all

- name: Run Unit Tests
working-directory: ethereum_history_api/oracles
run: yarn test:unit

- name: Start Anvil
run: |
anvil &
ANVIL_PID=$!
echo "ANVIL_PID=$ANVIL_PID" >> $GITHUB_ENV
- name: Compile Smart Contract
working-directory: ethereum_history_api/contracts
run: forge build

- name: Run e2e Tests
working-directory: ethereum_history_api/tests
run: yarn test:e2e
Expand Down

0 comments on commit bf59947

Please sign in to comment.