Skip to content

Commit

Permalink
ci: refactor test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
steinuil committed Jan 2, 2025
1 parent 457221d commit e8aa970
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
name: Test/lint

on:
- push
- pull_request

name: CI

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: "0"

jobs:
build_and_test:
test-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
# - x86_64-pc-windows-gnu
- x86_64-unknown-linux-musl
include:
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-gnu

- build: windows-gnu
os: windows-latest
target: x86_64-pc-windows-gnu

steps:
- name: Install target
run: rustup target add ${{ matrix.target }}
- uses: actions/checkout@v4
- name: Build
run: cargo check --target ${{ matrix.target }} --verbose
- name: Run tests
run: cargo test --target ${{ matrix.target }} --verbose
- name: Run clippy
run: cargo clippy
- name: Run rustfmt
run: cargo fmt --check
- name: Clone repository
uses: actions/checkout@v4

- name: cargo check
run: cargo check --target ${{ matrix.target }}

- name: cargo test
run: cargo test --target ${{ matrix.target }}

- name: cargo clippy
run: cargo clippy

- name: cargo fmt
run: cargo fmt --check

0 comments on commit e8aa970

Please sign in to comment.