@@ -2,63 +2,28 @@ name: Rust
2
2
3
3
on :
4
4
push :
5
- branches : [ main ]
6
- tags : [ v* ]
5
+ branches : [main]
7
6
pull_request :
8
- branches : [ main ]
7
+
8
+ env :
9
+ RUST_BACKTRACE : 1
10
+ CARGO_TERM_COLOR : always
11
+ CLICOLOR : 1
9
12
10
13
jobs :
11
14
test :
12
15
strategy :
13
16
matrix :
14
17
os : [ubuntu-latest, macos-latest]
15
- rustv : [stable, beta, nightly ]
18
+ rustv : [stable, beta]
16
19
runs-on : ${{ matrix.os }}
17
20
steps :
18
- - uses : actions/checkout@v2
19
- - name : Install rust
20
- uses : actions-rs/toolchain@v1
21
- with :
22
- toolchain : ${{ matrix.rustv }}
23
- override : true
24
- - name : Run cargo check
25
- uses : actions-rs/cargo@v1
26
- with :
27
- command : check
28
- - name : Run cargo test
29
- uses : actions-rs/cargo@v1
30
- with :
31
- command : test
32
-
33
- release :
34
- needs : test
35
- if : startsWith(github.ref, 'refs/tags/')
36
- strategy :
37
- matrix :
38
- runner :
39
- - os : ubuntu-16.04
40
- target : x86_64-unknown-linux-gnu
41
- - os : macos-10.15
42
- target : x86_64-apple-darwin
43
- runs-on : ${{ matrix.runner.os }}
44
- env :
45
- TARGET : ${{ matrix.runner.target }}
46
- PROJECT_NAME : git-fixup
47
- REF : ${{ github.ref }}
48
- steps :
49
- - uses : actions/checkout@v2
50
- - name : Install rust
51
- uses : actions-rs/toolchain@v1
52
- with :
53
- toolchain : stable
54
- target : ${{ matrix.runner.target }}
55
- override : true
56
- - name : Build Release
57
- run : ./ci/build-release-artifacts.sh
58
- - name : Upload Release
59
- uses : softprops/action-gh-release@v1
60
- with :
61
- files : |
62
- deployment/*.tar.gz
63
- env :
64
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
21
+ - uses : actions/checkout@v4
22
+ - name : Install Rust
23
+ uses : dtolnay/rust-toolchain@stable
24
+ with :
25
+ toolchain : ${{ matrix.rustv }}
26
+ override : true
27
+ - uses : swatinem/rust-cache@v2
28
+ - name : Test
29
+ run : cargo test
0 commit comments