ircparser/.github/workflows/ci.yml
2022-07-30 16:21:28 +01:00

57 lines
1.1 KiB
YAML

# "Borrowed" with permission from https://github.com/Jonxslays/piston_rs/blob/master/.github/workflows/ci.yml.
# Thanks bud!
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
lint-and-format:
name: Lint and format
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Rust (stable)
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Run format check
run: cargo fmt -- --check
- name: Run clippy check
run: cargo clippy
test-and-build:
name: Test and build
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust_version: [1.31.0, 1.56.0, stable, nightly]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Rust (${{ matrix.rust_version }})
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust_version }}
- name: Run tests
run: cargo test
- name: Build package
run: cargo build