File tree 1 file changed +52
-9
lines changed
1 file changed +52
-9
lines changed Original file line number Diff line number Diff line change 1
- name : Rust
1
+ name : Build
2
2
3
3
on :
4
4
push :
5
- branches : [ master ]
5
+ branches :
6
+ - " master"
7
+ - " develop"
8
+ tags :
9
+ - " *"
10
+ schedule :
11
+ - cron : " 40 4 * * *" # every day at 4:40
6
12
pull_request :
7
- branches : [ master ]
8
13
9
14
jobs :
10
- build :
15
+ test :
16
+ name : " Test"
11
17
18
+ strategy :
19
+ matrix :
20
+ os : [ubuntu-latest, macos-latest, windows-latest]
21
+
22
+ runs-on : ${{ matrix.os }}
23
+ timeout-minutes : 15
24
+
25
+ steps :
26
+ - name : " Checkout Repository"
27
+ uses : actions/checkout@v1
28
+
29
+ - name : Install Rustup
30
+ run : |
31
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
32
+ echo ::add-path::$HOME/.cargo/bin
33
+ if : runner.os == 'macOS'
34
+
35
+ - name : " Print Rust Version"
36
+ run : |
37
+ rustc -Vv
38
+ cargo -Vv
39
+
40
+ - name : " Run cargo build"
41
+ run : cargo build
42
+
43
+ - name : " Run cargo test"
44
+ run : cargo test
45
+
46
+ check_formatting :
47
+ name : " Check Formatting"
12
48
runs-on : ubuntu-latest
49
+ timeout-minutes : 2
50
+ steps :
51
+ - uses : actions/checkout@v1
52
+ - run : rustup toolchain install nightly --profile minimal --component rustfmt
53
+ - run : cargo +nightly fmt -- --check
13
54
55
+ clippy :
56
+ name : " Clippy"
57
+ runs-on : ubuntu-latest
58
+ timeout-minutes : 10
14
59
steps :
15
- - uses : actions/checkout@v2
16
- - name : Build
17
- run : cargo build --verbose
18
- - name : Run tests
19
- run : cargo test --verbose
60
+ - uses : actions/checkout@v1
61
+ - run : rustup toolchain install nightly --profile minimal --component clippy
62
+ - run : cargo +nightly clippy -- -D warnings
You can’t perform that action at this time.
0 commit comments