Check in Cargo.lock #13
Workflow file for this run
This file contains 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: Build and test | |
on: | |
- push | |
# Build if requested manually from the Actions tab | |
- workflow_dispatch | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: --deny warnings | |
jobs: | |
formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: rustfmt | |
default: true | |
- name: Check formatting | |
run: cargo fmt -- --check | |
# Enable this after fixing all the stuff clippy complains about | |
# linting: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: actions-rs/toolchain@v1 | |
# with: | |
# profile: minimal | |
# toolchain: stable | |
# components: clippy | |
# default: true | |
# - name: Lint (clippy) | |
# uses: actions-rs/clippy-check@v1 | |
# with: | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
build-and-test: | |
strategy: | |
matrix: | |
rust: [stable, beta, nightly, 1.56.0] | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
default: true | |
- name: Build | |
run: cargo build --all-targets | |
- name: Test | |
# Since the tests modify global state (the system firewall) they cannot | |
# run in parallel. | |
run: sudo cargo test -- --test-threads=1 |