Skip to content

Commit e12d3b6

Browse files
authored
[CICD] Fix mac tests (#712)
## Summary This fixes mac os tests by setting `NIX_PATH` on the test itself. This should not be needed so it makes me a bit nervous we are covering up another issue. Added auto-install test for mac ## How was it tested? CICD
1 parent 30e191f commit e12d3b6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/cli-tests.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,13 @@ jobs:
102102
echo "PATH=$PATH" >> $GITHUB_ENV
103103
- name: Run tests
104104
run: |
105-
export NIX_PATH=nixpkgs=https://github.com/nixos/nixpkgs/tarball/nixos-unstable
106105
go test -race -cover -v ./...
107106
108107
auto-nix-install: # ensure Devbox installs nix and works properly after installation.
109-
runs-on: ubuntu-latest
108+
strategy:
109+
matrix:
110+
os: [ubuntu-latest, macos-latest]
111+
runs-on: ${{ matrix.os }}
110112
steps:
111113
- uses: actions/checkout@v3
112114
- uses: actions/[email protected]

internal/boxcli/shell_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ func (sh *shell) exit(t *testing.T) {
295295
}
296296

297297
func TestShell(t *testing.T) {
298+
t.Setenv("NIX_PATH", "nixpkgs=https://github.com/nixos/nixpkgs/tarball/nixos-unstable")
298299
devboxJSON := `
299300
{
300301
"packages": [],

0 commit comments

Comments
 (0)