Skip to content

Speed up CI and modernize tests #193

Speed up CI and modernize tests

Speed up CI and modernize tests #193

Workflow file for this run

name: Rust testing and building
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
setup-rust:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.79.0
components: clippy, rustfmt
target: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install nextest
uses: taiki-e/install-action@v2
with:
tool: nextest
lint:
needs: setup-rust
runs-on: ubuntu-latest
strategy:
matrix:
component: [near]
check: [clippy, fmt]
steps:
- name: Run ${{ matrix.check }}
run: |
make ${{ matrix.check }}-${{ matrix.component }}
build:
needs: setup-rust
runs-on: ubuntu-latest
steps:
- name: Build Near contract
run: |
make rust-build-near
test:
needs: setup-rust
runs-on: ubuntu-latest
steps:
- name: Test Near contracts
run: |
make test-near