Skip to content

Commit 21c4e02

Browse files
authored
Modernized Github Actions (#7)
1 parent c4551e1 commit 21c4e02

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

.github/workflows/rust.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
1-
name: Rust
1+
name: Build and Test
22

33
on:
44
push:
5-
branches: [ "master" ]
6-
pull_request:
7-
branches: [ "master" ]
85

96
env:
107
CARGO_TERM_COLOR: always
118

129
jobs:
1310
build:
14-
1511
runs-on: ubuntu-latest
1612

1713
steps:
18-
- uses: actions/checkout@v3
19-
- name: Build
20-
run: cargo build --verbose
21-
- name: Run tests
22-
run: cargo test --verbose
14+
- uses: actions/checkout@v5
15+
16+
- name: Cache
17+
uses: actions/cache@v4
18+
with:
19+
path: |
20+
~/.cargo/registry
21+
~/.cargo/git
22+
target
23+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
24+
25+
- name: Build
26+
run: cargo build --verbose
27+
28+
- name: Run tests
29+
run: cargo test --verbose

0 commit comments

Comments
 (0)