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  lint:
48    runs-on: ubuntu-latest
49    steps:
50      - name: Checkout sources
51        uses: actions/checkout@v2
52      - name: Install stable toolchain
53        uses: actions-rs/toolchain@v1
54        with:
55          profile: minimal
56          toolchain: stable
57          override: true
58          components: rustfmt, clippy
59      - name: cargo fmt
60        run: cargo fmt --all -- --check
61      - name: cargo clippy
62        run: cargo clippy -- -D warnings