-
Notifications
You must be signed in to change notification settings - Fork 347
76 lines (67 loc) · 2.03 KB
/
test.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
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
64
65
66
67
68
69
70
71
72
73
74
75
76
on: [push, pull_request]
name: Continuous integration
jobs:
test_linux:
name: Test Linux
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- run: cargo test
# This also runs tests that rely on the MIME database being
# present.
- run: cargo test -- --ignored
test_linux_latest_stable:
name: Test Linux (latest stable Rust)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo +stable test
# test_linux_arm64:
# name: Test Linux arm64 (build only)
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v3
# - uses: dtolnay/[email protected]
# - run: rustup target add aarch64-unknown-linux-gnu
# - run: sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
# - run: cargo build --target=aarch64-unknown-linux-gnu
test_mac:
name: Test macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- run: cargo test
test_windows:
name: Test Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- run: cargo test
regression_test:
name: Output Regression Test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- name: Generate output for all sample files
run: ./sample_files/compare_all.sh
- name: Verify output is unchanged
run: diff -C2 sample_files/compare.result sample_files/compare.expected
package:
name: Check Linux Packaging
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- run: cargo package --allow-dirty
fmt:
name: Rustfmt
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- run: cargo fmt --all -- --check