-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from zkemail/TomAFrench-tf/add-ci
chore(ci): add a CI setup real
- Loading branch information
Showing
12 changed files
with
511 additions
and
351 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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Noir tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: Test on Nargo ${{matrix.toolchain}} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
toolchain: [0.36.0] | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nargo | ||
uses: noir-lang/[email protected] | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
|
||
- name: Run Noir tests | ||
working-directory: ./lib | ||
run: nargo test | ||
|
||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nargo | ||
uses: noir-lang/[email protected] | ||
with: | ||
toolchain: 0.36.0 | ||
|
||
- name: Run formatter | ||
working-directory: ./lib | ||
run: nargo fmt --check | ||
|
||
# This is a job which depends on all test jobs and reports the overall status. | ||
# This allows us to add/remove test jobs without having to update the required workflows. | ||
tests-end: | ||
name: Noir End | ||
runs-on: ubuntu-latest | ||
# We want this job to always run (even if the dependant jobs fail) as we want this job to fail rather than skipping. | ||
if: ${{ always() }} | ||
needs: | ||
- test | ||
- format | ||
|
||
steps: | ||
- name: Report overall success | ||
run: | | ||
if [[ $FAIL == true ]]; then | ||
exit 1 | ||
else | ||
exit 0 | ||
fi | ||
env: | ||
# We treat any cancelled, skipped or failing jobs as a failure for the workflow as a whole. | ||
FAIL: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }} |
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
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
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
Oops, something went wrong.