More Corpora Commander - but, it's time to start on v3 (#99) #134
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rust CI | |
| on: | |
| pull_request: | |
| paths: | |
| - 'rs/**' | |
| - '.github/**' | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v3 | |
| - name: Set up Rust | |
| uses: moonrepo/setup-rust@v1 | |
| with: | |
| channel: stable | |
| profile: minimal # Faster, no docs | |
| components: rustfmt, clippy | |
| cache: true | |
| - name: Build the workspace | |
| working-directory: rs | |
| run: cargo build --workspace --all-targets | |
| - name: Format check | |
| working-directory: rs | |
| run: cargo fmt -- --check | |
| - name: Lint the code | |
| working-directory: rs | |
| run: cargo clippy --workspace --all-targets -- -A clippy::uninlined-format-args -D warnings | |
| - name: Run tests | |
| working-directory: rs | |
| run: cargo test --workspace | |
| # - name: Cache Cargo | |
| # uses: actions/cache@v3 | |
| # with: | |
| # path: ~/.cargo/registry | |
| # key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| # restore-keys: | | |
| # ${{ runner.os }}-cargo- |