Skip to content

chore: merge pull request #26 from graelo/ci/macos #93

chore: merge pull request #26 from graelo/ci/macos

chore: merge pull request #26 from graelo/ci/macos #93

Workflow file for this run

# Any commit on main & PRs
name: Essentials
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Quality checks & tests
runs-on: macos-latest
strategy:
matrix:
rust: [stable]
steps:
- name: Rust install
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
# fetch-depth: ${{ github.event.pull_request.commits }}
- name: Cache crates from crates.io
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: '${{ runner.os }}-cargo-${{ matrix.rust }}-hash-${{ hashFiles(''**/Cargo.lock'') }}'
- name: Quality - cargo fmt
run: |
cargo fmt --all -- --check
- name: Quality - cargo clippy
run: |
cargo clippy # -- -D warnings
- name: Quality - convco check
run: |
git show-ref
echo Commit message: "$(git log -1 --pretty=%B)"
curl -sSfLO https://github.com/convco/convco/releases/latest/download/convco-macos.zip
unzip convco-macos.zip
chmod +x convco
./convco --version
./convco check -c .convco
rm convco
- name: Quality - cargo deny check
run: |
curl -sSfL https://github.com/EmbarkStudios/cargo-deny/releases/download/0.16.1/cargo-deny-0.16.1-aarch64-apple-darwin.tar.gz | gtar zx --no-anchored cargo-deny --strip-components=1
chmod +x cargo-deny
mv cargo-deny ~/.cargo/bin/
cargo deny check
# - name: Quality - cargo outdated
# timeout-minutes: 20
# run: |
# cargo install --locked cargo-outdated || true
# rm -rf ~/.cargo/advisory-db
# cargo outdated --exit-code 1
# - name: Quality - cargo udeps (needs nightly)
# run: |
# cargo install --locked cargo-udeps || true
# cargo udeps
- name: Quality - cargo pants
run: |
cargo install --locked cargo-pants || true
cargo pants
- name: Build (dev)
run: cargo build --all-features
- name: Build (release)
run: cargo build --all-features --release
- name: Test
run: ./ci/test_full.sh