Skip to content

Commit

Permalink
[tests] Add test for old nix versions (#1313)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
mikeland73 authored Jul 26, 2023
1 parent 2cfe2cf commit 26d533d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/cli-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,31 @@ jobs:
echo "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" > ~/.config/nix/nix.conf
devbox run echo "Installing packages..."
- name: Test removing package
run: devbox rm go

test-with-old-nix-version:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
version: [2.15.1]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: ./go.mod
- name: Build devbox
run: go install ./cmd/devbox
- name: Install nix
run: sh <(curl -L https://releases.nixos.org/nix/nix-${{ matrix.version }}/install) --daemon
- name: Install devbox packages
run: |
# Setup github authentication to ensure Github's rate limits are not hit.
# If this works, we can consider refactoring this into a reusable github action helper.
mkdir -p ~/.config/nix
echo "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" > ~/.config/nix/nix.conf
devbox run echo "Installing packages..."
- name: Test removing package
run: devbox rm go

0 comments on commit 26d533d

Please sign in to comment.