Skip to content

Commit 0387156

Browse files
committed
Modernize GitHub action.
[rust]
1 parent f3a191b commit 0387156

File tree

1 file changed

+10
-25
lines changed

1 file changed

+10
-25
lines changed

.github/workflows/ci.yaml

+10-25
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,27 @@ jobs:
88
runs-on: ubuntu-latest
99
if: "contains(github.event.head_commit.message, '[rust]')"
1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1212

13-
- name: Setup TypeScript compiler
14-
run: yarn global add typescript@next
15-
16-
- name: Install build dependencies
17-
run: sudo apt-get install -y -q sassc
18-
env:
19-
DEBIAN_FRONTEND: noninteractive
20-
21-
- name: Setup Install rust toolchain
22-
uses: actions-rs/toolchain@v1
13+
- uses: DeterminateSystems/nix-installer-action@main
2314
with:
24-
toolchain: nightly
25-
override: true
15+
diagnostic-endpoint: ''
2616

27-
- name: cargo build
28-
uses: actions-rs/cargo@v1
17+
- uses: DeterminateSystems/magic-nix-cache-action@main
2918
with:
30-
command: build
31-
args: --all-targets
32-
env:
33-
SQLX_OFFLINE: true
19+
diagnostic-endpoint: ''
20+
21+
- name: cargo build
22+
run: nix build
3423

3524
- name: cargo test
36-
uses: actions-rs/cargo@v1
37-
with:
38-
command: test
39-
env:
40-
SQLX_OFFLINE: true
25+
run: nix develop --command cargo test
4126

4227
check-js:
4328
name: "check frontend code"
4429
runs-on: ubuntu-latest
4530
steps:
46-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
4732

4833
- name: Install dependencies
4934
run: cd ircj-serve && yarn

0 commit comments

Comments
 (0)