Skip to content

Commit ec6fe93

Browse files
committed
Update test workflow.
1 parent 6c3a4c7 commit ec6fe93

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,22 @@ jobs:
77
-
88
name: Checkout
99
uses: actions/checkout@v2
10+
-
11+
name: Install Nix
12+
uses: cachix/install-nix-action@v20
13+
with:
14+
nix_path: nixpkgs=channel:nixos-23.05
1015
-
1116
name: Cargo cache
1217
uses: actions/cache@v3
1318
with:
14-
path: .rust/
15-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
16-
-
17-
name: Run the tests
18-
run: make test
19+
path: |
20+
~/.cargo/bin/
21+
~/.cargo/registry/index/
22+
~/.cargo/registry/cache/
23+
~/.cargo/git/db/
24+
target/
25+
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
1926
-
20-
name: Make cache accessible to caching action
21-
run: |
22-
sudo chown $(whoami):$(whoami) -R .rust
27+
name: Run tests
28+
run: nix-shell --command "make test"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# hidden files
22
.*
33
!/.cargo
4+
!/.github
45

56
# rust buids / cache
67
/target

docker-compose.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,4 @@ services:
66
dockerfile: Dockerfile-devel
77
volumes:
88
- ./:/chirpstack-udp-forwarder
9-
- ./.rust/target:/chirpstack-udp-forwarder/target
10-
- ./.rust/rustup:/usr/local/rustup
11-
- ./.rust/cargo/registry/index:/usr/local/cargo/registry/index
12-
- ./.rust/cargo/registry/cache:/usr/local/cargo/registry/cache
13-
- ./.rust/cargo/git/db:/usr/local/cargo/git/db
9+

shell.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-22.11.tar.gz") {} }:
1+
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-23.05.tar.gz") {} }:
22

33
pkgs.mkShell {
44
buildInputs = [

0 commit comments

Comments
 (0)