-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rearrange build steps to avoid creating fake artefacts
- Loading branch information
1 parent
bb6b0db
commit bf59947
Showing
1 changed file
with
11 additions
and
25 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 |
---|---|---|
|
@@ -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: | ||
|
@@ -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 | ||
|