Skip to content

Commit ba0dd84

Browse files
authored
Merge pull request #208 from cachix/fix-macos-tests
ci: fix tests
2 parents 1e14eb0 + d9660bf commit ba0dd84

File tree

1 file changed

+49
-17
lines changed

1 file changed

+49
-17
lines changed

.github/workflows/test.yml

+49-17
Original file line numberDiff line numberDiff line change
@@ -5,57 +5,81 @@ on:
55
branches:
66
- master
77

8+
env:
9+
nixpkgs_channel: nixpkgs=channel:nixos-23.11
10+
oldest_supported_installer: nix-2.8.0
11+
# Fetch new versions from the Nix CI run: https://github.com/NixOS/nix/blob/master/.github/workflows/ci.yml
12+
# TODO: add pinning upstream or rethink this
13+
pinned_installer_hash: zfzfrbb59jsqrfkldwj8drcr9nhhc49k
14+
815
jobs:
916
simple-build:
1017
strategy:
18+
fail-fast: false
1119
matrix:
12-
os: [ubuntu-latest, macos-latest]
20+
os:
21+
- ubuntu-latest
22+
- macos-latest
23+
- macos-13
1324
runs-on: ${{ matrix.os }}
1425
steps:
1526
- uses: actions/checkout@v4
1627
- name: Install Nix
1728
uses: ./
1829
with:
19-
nix_path: nixpkgs=channel:nixos-22.11
30+
nix_path: ${{ env.nixpkgs_channel }}
2031
- run: nix-env -iA cachix -f https://cachix.org/api/v1/install
2132
- run: cat /etc/nix/nix.conf
2233
# cachix should be available and be able to configure a cache
2334
- run: cachix use cachix
2435
- run: nix-build test.nix
36+
2537
custom-nix-path:
2638
strategy:
39+
fail-fast: false
2740
matrix:
28-
os: [ubuntu-latest, macos-latest]
41+
os:
42+
- ubuntu-latest
43+
- macos-latest
44+
- macos-13
2945
runs-on: ${{ matrix.os }}
3046
steps:
3147
- uses: actions/checkout@v4
3248
- name: Install Nix
3349
uses: ./
3450
with:
35-
nix_path: nixpkgs=channel:nixos-20.03
36-
- run: test $NIX_PATH == "nixpkgs=channel:nixos-20.03"
51+
nix_path: ${{ env.nixpkgs_channel }}
52+
- run: test $NIX_PATH == '${{ env.nixpkgs_channel }}'
3753
- run: nix-build test.nix
3854

3955
extra-nix-config:
4056
strategy:
57+
fail-fast: false
4158
matrix:
42-
os: [ubuntu-latest, macos-latest]
59+
os:
60+
- ubuntu-latest
61+
- macos-latest
62+
- macos-13
4363
runs-on: ${{ matrix.os }}
4464
steps:
4565
- uses: actions/checkout@v4
4666
- name: Install Nix
4767
uses: ./
4868
with:
49-
nix_path: nixpkgs=channel:nixos-22.11
69+
nix_path: ${{ env.nixpkgs_channel }}
5070
extra_nix_config: |
5171
sandbox = relaxed
5272
- run: cat /etc/nix/nix.conf
5373
- run: nix-build test.nix --arg noChroot true
5474

5575
flakes:
5676
strategy:
77+
fail-fast: false
5778
matrix:
58-
os: [ubuntu-latest, macos-latest]
79+
os:
80+
- ubuntu-latest
81+
- macos-latest
82+
- macos-13
5983
runs-on: ${{ matrix.os }}
6084
steps:
6185
- uses: actions/checkout@v4
@@ -65,37 +89,45 @@ jobs:
6589

6690
installer-options:
6791
strategy:
92+
fail-fast: false
6893
matrix:
69-
os: [ubuntu-latest, macos-latest]
94+
os:
95+
- ubuntu-latest
96+
# - macos-latest missing installer for aarch64-darwin
97+
- macos-13
7098
runs-on: ${{ matrix.os }}
7199
steps:
72100
- uses: actions/checkout@v4
73101
- name: Install Nix
74102
uses: ./
75103
with:
76-
nix_path: nixpkgs=channel:nixos-22.11
104+
nix_path: ${{ env.nixpkgs_channel }}
77105
install_options: --tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve
78-
install_url: https://nixos-nix-install-tests.cachix.org/serve/s62m7lc0q0mz2mxxm9q0kkrcg90njzhq/install
106+
install_url: https://nixos-nix-install-tests.cachix.org/serve/${{ env.pinned_installer_hash }}/install
79107
- run: nix-build test.nix
80108

81109
oldest-supported-installer:
82110
strategy:
83-
matrix:
84-
os: [ubuntu-latest, macos-latest]
111+
fail-fast: false
112+
matrix:
113+
os:
114+
- ubuntu-latest
115+
- macos-latest
116+
- macos-13
85117
runs-on: ${{ matrix.os }}
86118
steps:
87119
- uses: actions/checkout@v4
88120
- name: Install Nix
89121
uses: ./
90122
with:
91-
nix_path: nixpkgs=channel:nixos-22.11
92-
install_url: https://releases.nixos.org/nix/nix-2.8.0/install
123+
nix_path: ${{ env.nixpkgs_channel }}
124+
install_url: https://releases.nixos.org/nix/${{ env.oldest_supported_installer }}/install
93125
- run: nix-build test.nix
94126

95127
act-support:
96128
strategy:
97-
matrix:
98-
os: [ubuntu-latest]
129+
matrix:
130+
os: [ubuntu-latest]
99131
runs-on: ${{ matrix.os }}
100132
steps:
101133
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)