Skip to content

feat: oracle support for bignum (WIP) #200

feat: oracle support for bignum (WIP)

feat: oracle support for bignum (WIP) #200

Workflow file for this run

name: Noir tests
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test on Nargo ${{matrix.toolchain}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: [nightly, 0.36.0]
steps:
- name: Checkout sources
uses: actions/checkout@v4
# install rust
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Install Nargo
uses: noir-lang/[email protected]
with:
toolchain: ${{ matrix.toolchain }}
# run the PRC server in the oracles directory in the background
- name: run the PRC server
run: |
cd oracles && cargo build
RUST_LOG=info cargo run &
echo "Waiting for server to start..."
# Wait for port 3000 to become available
timeout 30 bash -c 'until nc -z localhost 3000; do sleep 1; done'
echo "Server is ready!"
- name: Run Noir tests with oracle resolver.
run: nargo test --oracle-resolver http://127.0.0.1:3000
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
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') }}