Add pull_requests to verify.yml #6
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: Verify Build | |
| on: | |
| push: | |
| branches: [mainline] | |
| paths-ignore: | |
| - "**.md" | |
| pull_request: | |
| branches: [mainline] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Cache Cargo registry | |
| uses: actions/cache@v3 | |
| continue-on-error: false | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache build artifacts | |
| uses: actions/cache@v3 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-cargo-build-artifacts-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Lint | |
| run: cargo fmt -- --check | |
| - name: Clippy | |
| run: cargo clippy --release -- -D warnings --no-deps | |
| - name: Test | |
| run: cargo test |