-
Notifications
You must be signed in to change notification settings - Fork 413
33 lines (32 loc) · 964 Bytes
/
rust-ci.yml
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
name: "Rust CI"
on:
push:
pull_request:
paths:
- src/**
merge_group:
# Trigger jobs when PR is added to merge queue
types: [checks_requested]
jobs:
check:
name: Rust CI
runs-on: ubuntu-latest
strategy:
matrix:
extension: ["src/core"]
steps:
- uses: actions/checkout@v4
- name: Install latest stable toolchain and rustfmt
run: rustup update stable && rustup default stable && rustup component add rustfmt clippy
- name: Run cargo build
run: cargo build
working-directory: ${{ matrix.extension }}
- name: Run cargo fmt
run: cargo fmt --all -- --check
working-directory: ${{ matrix.extension }}
- name: Run cargo clippy
run: cargo clippy -- -D warnings
working-directory: ${{ matrix.extension }}
- name: Run cargo test
run: cargo test --no-fail-fast --locked
working-directory: ${{ matrix.extension }}