-
-
Notifications
You must be signed in to change notification settings - Fork 6
51 lines (43 loc) · 1.14 KB
/
pr.yaml
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
name: pr
on:
pull_request:
paths-ignore:
- "LICENSE"
- "README.md"
- "emmylua.md"
- "stylua.toml"
- "todo.txt"
branches:
- master
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
job:
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
# - { os: windows-latest, target: x86_64-pc-windows-msvc }
# - { os: macos-latest, target: x86_64-apple-darwin }
runs-on: ${{ matrix.job.os }}
timeout-minutes: 10
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Initialize workflow variables
id: vars
shell: bash
run: |
echo "MSRV=$(sed -n 's/^rust-version = "\(.*\)"/\1/p' Cargo.toml)" >> $GITHUB_ENV
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}
target: ${{ matrix.job.target }}
components: clippy,rustfmt
- name: Test
run: cargo test --all-features
- name: Lint
run: cargo clippy --all-features
- name: Format
run: cargo fmt --check