name: CI on: push: branches: - main pull_request: branches: - main jobs: test: name: Build & Test (+nightly) / ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] steps: - uses: actions/checkout@v3.0.2 - uses: actions-rs/toolchain@v1.0.7 with: toolchain: nightly override: true - name: cargo fetch uses: actions-rs/cargo@v1 with: command: fetch - name: Build (+nightly) uses: actions-rs/cargo@v1 with: command: build args: --verbose --release - name: Test (+nightly) uses: actions-rs/cargo@v1 with: command: test args: --verbose --all-features clippy: name: Clippy (+nightly) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.0.2 - uses: actions-rs/toolchain@v1.0.7 with: toolchain: nightly components: clippy override: true - name: Run clippy uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-features --all-targets -- -D warnings coverage: name: Code Coverage (+nightly) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.0.2 - uses: actions-rs/toolchain@v1.0.7 with: toolchain: nightly components: llvm-tools-preview override: true - name: Install rustfilt, cargo-llvm-cov cargo commands run: | cargo install rustfilt cargo install cargo-llvm-cov --version 0.1.0-alpha.3 - name: Generate code coverage run: cargo llvm-cov --all-features --lcov > lcov.info - name: Upload coverage report to Codecov uses: codecov/codecov-action@v3.1.0