Skip to content

Commit 26d533d

Browse files
authored
[tests] Add test for old nix versions (#1313)
## Summary Since we saw CLI format change (See #1308) we should test against many nix versions. Possible followup: In `main` should we run all nix versions? ## How was it tested? CICD
1 parent 2cfe2cf commit 26d533d

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/cli-tests.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,31 @@ jobs:
139139
echo "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" > ~/.config/nix/nix.conf
140140
141141
devbox run echo "Installing packages..."
142+
- name: Test removing package
143+
run: devbox rm go
144+
145+
test-with-old-nix-version:
146+
strategy:
147+
matrix:
148+
os: [ubuntu-latest, macos-latest]
149+
version: [2.15.1]
150+
runs-on: ${{ matrix.os }}
151+
steps:
152+
- uses: actions/checkout@v3
153+
- uses: actions/setup-go@v4
154+
with:
155+
go-version-file: ./go.mod
156+
- name: Build devbox
157+
run: go install ./cmd/devbox
158+
- name: Install nix
159+
run: sh <(curl -L https://releases.nixos.org/nix/nix-${{ matrix.version }}/install) --daemon
160+
- name: Install devbox packages
161+
run: |
162+
# Setup github authentication to ensure Github's rate limits are not hit.
163+
# If this works, we can consider refactoring this into a reusable github action helper.
164+
mkdir -p ~/.config/nix
165+
echo "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" > ~/.config/nix/nix.conf
166+
167+
devbox run echo "Installing packages..."
168+
- name: Test removing package
169+
run: devbox rm go

0 commit comments

Comments
 (0)