Add CI #18
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- "*" | |
tags: | |
- "*" | |
jobs: | |
test: | |
name: Test | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install system dependencies | |
run: script/bootstrap | |
- name: Setup | Cache Cargo | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ubuntu-test-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Lint | |
run: | | |
cargo install cargo-machete | |
cargo machete | |
cargo clippy | |
- name: Build test | |
run: cargo build |