-
Notifications
You must be signed in to change notification settings - Fork 18
103 lines (93 loc) · 2.76 KB
/
test.yaml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: test
# Runs the Devbox installer tests
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
push:
branches:
- main
paths-ignore:
- '**.md'
workflow_call:
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
test-action:
strategy:
matrix:
os: [macos-13, macos-14, macos-latest, ubuntu-latest]
use-cache: [true, false]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install devbox
uses: ./
with:
project-path: 'testdata'
enable-cache: ${{ matrix.use-cache }}
disable-nix-access-token: "${{ github.ref != 'refs/heads/main' }}"
test-action-with-devbox-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install devbox
uses: ./
with:
devbox-version: 0.13.6
project-path: 'testdata'
disable-nix-access-token: "${{ github.ref != 'refs/heads/main' }}"
test-action-with-nix-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install devbox
uses: ./
with:
project-path: 'testdata'
nix-version: v0.32.3
disable-nix-access-token: "${{ github.ref != 'refs/heads/main' }}"
test-action-with-sha256-checksum:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install devbox
uses: ./
with:
devbox-version: 0.13.6
refresh-cli: true
project-path: 'testdata'
sha256-checksum: '22a31081df183aab7b8f88a794505c7c0ae217d6314e61b3e0bfe6972b992199'
disable-nix-access-token: "${{ github.ref != 'refs/heads/main' }}"
test-action-with-sha256-checksum-failure:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install devbox
id: install-devbox
uses: ./
continue-on-error: true
with:
devbox-version: 0.13.6
refresh-cli: true
sha256-checksum: 'bad-sha'
project-path: 'testdata'
disable-nix-access-token: "${{ github.ref != 'refs/heads/main' }}"
- name: Fail on success
if: steps.install-devbox.outcome == 'success'
run: echo "The SHA check should have failed!" && exit 1
test-action-with-sha256-checksum-on-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install devbox
uses: ./
with:
devbox-version: 0.13.6
refresh-cli: true
sha256-checksum: '169836de22c41a1c68ac5a43e0514d4021137647c7c08ee8bd921faa430ee286'
project-path: 'testdata'
disable-nix-access-token: "${{ github.ref != 'refs/heads/main' }}"