arnaucube
arnaucube/circom-compatPublic Self-hosted repository
circom-compat/.github/workflows/ci.yml
.github/workflows/ci.ymlRaw
 1on:
 2  push:
 3    branches:
 4      - master
 5  pull_request:
 6
 7name: Tests
 8
 9jobs:
10  tests:
11    runs-on: ubuntu-latest
12    steps:
13      - name: Checkout sources
14        uses: actions/checkout@v2
15      - name: Install stable toolchain
16        uses: actions-rs/toolchain@v1
17        with:
18          profile: minimal
19          toolchain: stable
20          override: true
21
22      - name: Install node
23        uses: actions/setup-node@v1
24        with:
25          node-version: 10
26
27      - name: Install ganache
28        run: npm install -g ganache-cli
29
30      - name: Install Solc
31        run: |
32            mkdir -p "$HOME/bin"
33            wget -q https://github.com/ethereum/solidity/releases/download/v0.7.6/solc-static-linux -O $HOME/bin/solc
34            chmod u+x "$HOME/bin/solc"
35            export PATH=$HOME/bin:$PATH
36            solc --version            
37
38      - uses: Swatinem/rust-cache@v1
39        with:
40          cache-on-failure: true
41
42      - name: cargo test
43        run: |
44            export PATH=$HOME/bin:$PATH
45            cargo test            
46
47      - name: cargo test circom 2 feature flag
48        run: |
49            export PATH=$HOME/bin:$PATH
50            cargo test --features circom-2            
51
52  lint:
53    runs-on: ubuntu-latest
54    steps:
55      - name: Checkout sources
56        uses: actions/checkout@v2
57      - name: Install stable toolchain
58        uses: actions-rs/toolchain@v1
59        with:
60          profile: minimal
61          toolchain: stable
62          override: true
63          components: rustfmt, clippy
64      - name: cargo fmt
65        run: cargo fmt --all -- --check
66      - name: cargo clippy
67        run: cargo clippy -- -D warnings