on: push: branches: - main pull_request: branches: - main name: CI jobs: clippy_check: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 with: submodules: true - name: Install Rust uses: actions-rs/toolchain@v1 with: toolchain: stable components: clippy override: true - name: Check Clippy uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} toolchain: stable args: test: strategy: matrix: platform: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.platform }} steps: - name: Checkout code uses: actions/checkout@v3 with: submodules: true - name: Install Rust uses: actions-rs/toolchain@v1 with: toolchain: nightly override: true components: rustfmt, clippy - name: Cache cargo registry uses: actions/cache@v3 with: path: ~/.cargo/registry key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - name: Check formatting uses: actions-rs/cargo@v1 with: command: fmt args: --all -- --check - name: Run tests uses: actions-rs/cargo@v1 with: command: test