diff --git a/.github/workflows/arbitrator-ci.yml b/.github/workflows/arbitrator-ci.yml index f5155b158b..a7ae6dabfa 100644 --- a/.github/workflows/arbitrator-ci.yml +++ b/.github/workflows/arbitrator-ci.yml @@ -20,27 +20,6 @@ env: WABT_VERSION: 1.0.24 jobs: - rustfmt: - name: Rust formatting check - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Install rust stable - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: rustfmt - - - name: Rustfmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all --manifest-path arbitrator/Cargo.toml -- --check - coverage: name: Run Arbitrator tests runs-on: ubuntu-20.04 @@ -161,6 +140,12 @@ jobs: command: test args: --all --manifest-path arbitrator/Cargo.toml + - name: Rustfmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all --manifest-path arbitrator/Cargo.toml -- --check + - name: Make proofs from test cases run: make -j test-gen-proofs diff --git a/.github/workflows/arbitrator-skip-ci.yml b/.github/workflows/arbitrator-skip-ci.yml index 66ea0ed284..99d2a97436 100644 --- a/.github/workflows/arbitrator-skip-ci.yml +++ b/.github/workflows/arbitrator-skip-ci.yml @@ -11,12 +11,6 @@ on: - 'Makefile' jobs: - rustfmt: - name: Rust formatting check - runs-on: ubuntu-latest - steps: - - name: Do nothing - run: echo "doing nothing" coverage: name: Run Arbitrator tests runs-on: ubuntu-latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e12a9cbc1..452f625caa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,92 +9,6 @@ on: - develop jobs: - lint: - name: Linter - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - token: ${{ secrets.PRIVATE_CHECKOUT }} - submodules: recursive - - - name: Setup nodejs - uses: actions/setup-node@v2 - with: - node-version: '16' - cache: 'yarn' - cache-dependency-path: '**/yarn.lock' - - - name: Install go - uses: actions/setup-go@v2 - with: - go-version: 1.17.x - - - name: Install protobufs - run: | - sudo apt update && sudo apt install -y protobuf-compiler - go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26 - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1 - - - name: Install rust stable - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Cache Build Products - uses: actions/cache@v2 - with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - key: ${{ runner.os }}-lint-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-go- - - - name: Cache cbrotli - uses: actions/cache@v2 - id: cache-cbrotli - with: - path: | - target/include/brotli/ - target/lib-wasm/ - target/lib/libbrotlicommon-static.a - target/lib/libbrotlienc-static.a - target/lib/libbrotlidec-static.a - key: ${{ runner.os }}-brotli-${{ hashFiles('build-brotli.sh') }}-${{ hashFiles('.github/workflows/arbitrator-ci.yaml') }} - restore-keys: ${{ runner.os }}-brotli- - - - name: Build cbrotli-local - if: steps.cache-cbrotli.outputs.cache-hit != 'true' - run: ./build-brotli.sh -l - - - name: Setup emsdk - if: steps.cache-cbrotli.outputs.cache-hit != 'true' - uses: mymindstorm/setup-emsdk@v11 - with: - # Make sure to set a version number! - version: 3.1.6 - # This is the name of the cache folder. - # The cache folder will be placed in the build directory, - # so make sure it doesn't conflict with anything! - actions-cache-folder: 'emsdk-cache' - - - name: Build cbrotli-wasm - if: steps.cache-cbrotli.outputs.cache-hit != 'true' - run: ./build-brotli.sh -w - - - name: Build all lint dependencies - run: make -j build-node-deps - - - name: Lint - uses: golangci/golangci-lint-action@v2 - with: - version: latest - skip-go-installation: true - skip-pkg-cache: true - test: name: Go Tests runs-on: ubuntu-latest @@ -218,6 +132,16 @@ jobs: - name: Build run: make build test-go-deps -j + - name: Build all lint dependencies + run: make -j build-node-deps + + - name: Lint + uses: golangci/golangci-lint-action@v2 + with: + version: latest + skip-go-installation: true + skip-pkg-cache: true + - name: run tests with race detection run: gotestsum --format short-verbose --jsonfile test-output-withrace.json -- -race ./...