Skip to content

Setup GitHub Actions CI #1

Setup GitHub Actions CI

Setup GitHub Actions CI #1

Workflow file for this run

name: Rust
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
rustfmt:
name: ๐Ÿ—Š Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
lint:
name: ๐Ÿšจ Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install packages
run: sudo apt-get install xorg-dev libglu1-mesa-dev
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings
test:
name: โœ… Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install packages
run: sudo apt-get install xorg-dev libglu1-mesa-dev
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- name: Install cargo-nextest
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-nextest
locked: true
- uses: actions-rs/cargo@v1
with:
command: nextest
args: run --retries 5 --workspace --failure-output final
security_audit:
name: ๐Ÿ‘ฎ Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache cargo bin
uses: actions/cache@v1
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-audit
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}