-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (50 loc) · 1.78 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Test
on:
push:
pull_request:
jobs:
test-with-xdg-var:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://cache.garnix.io https://cache.nixos.org/
- id: create-temp-dir
run: mkdir -p $HOME/test-data-dir/
- id: run-wine
run: |
XDG_DATA_HOME=$HOME/test-data-dir/ nix run .#winetricks
- id: test-directory
run: |
if [ -d "$HOME/test-data-dir/affinity" ]; then
echo "$HOME/test-data-dir/affinity exists correctly"
else
echo "::error::Directory '$HOME/test-data-dir' does not exist"
exit 1
fi
test-without-xdg-var:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://cache.garnix.io https://cache.nixos.org/
- id: run-wine
run: |
unset XDG_DATA_HOME
nix run .#winetricks
- id: test-directory
run: |
if [ -d "$HOME/.local/share/affinity" ]; then
echo "Fell back without xdg_data_home correctly"
else
echo "::error::Directory '$HOME/.local/share/affinity' does not exist"
exit 1
fi