-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (60 loc) · 1.73 KB
/
test.yaml
File metadata and controls
63 lines (60 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Lint and Test
on:
push:
branches:
- "main"
pull_request:
permissions: read-all
env:
CRATE_NAME: coman
GITHUB_TOKEN: ${{ github.token }}
RUST_BACKTRACE: 1
RUSTFLAGS: "-Dwarnings"
jobs:
check-linux:
name: check-linux
strategy:
matrix:
platform:
- os_name: Linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-musl
bin: coman
name: coman-Linux-x86_64-musl.tar.gz
cargo_command: cargo
- os_name: Windows-aarch64
os: windows-latest
target: aarch64-pc-windows-msvc
bin: coman.exe
name: coman-Windows-aarch64.zip
cargo_command: cargo
# enable this if there's ever a case where something works on linux but not on macos
# - os_name: macOS-x86_64
# os: macOS-latest
# target: x86_64-apple-darwin
# bin: coman
# name: coman-Darwin-x86_64.tar.gz
# cargo_command: cargo
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install toolchain
# nightly needed for cargo fmt
uses: dtolnay/rust-toolchain@nightly
with:
targets: ${{ matrix.platform.target }}
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: "v0-rust"
- name: install tooling
run: cargo install oas3-gen@0.21.1
- name: Build
run: cargo build --verbose
- name: Check formatting
run: cargo +nightly fmt --check
- name: Lint
run: cargo clippy --all-targets --all-features -p coman
- name: Test
run: cargo test --verbose