-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (81 loc) · 2.35 KB
/
test.yml
File metadata and controls
94 lines (81 loc) · 2.35 KB
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
name: Test pixi-lock actions
on:
push:
branches: [main, test-me/*]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PIXI_VERSION: "v0.63.0"
jobs:
# TODO: Add a job that clears the GitHub cache
cache-pixi-lock:
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.create-and-cache.outputs.cache-key }}
pixi-version: ${{ steps.create-and-cache.outputs.pixi-version }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
path: pixi-lock
- name: Copy test files to working directory
shell: bash
run: cp -r pixi-lock/ci/test/* .
- name: Run create-and-cache action
id: create-and-cache
uses: ./pixi-lock/create-and-cache
with:
pixi-version: ${{ env.PIXI_VERSION }}
- name: Verify pixi.lock exists
shell: bash
run: |
if [ -f "pixi.lock" ]; then
echo "pixi.lock exists"
else
echo "pixi.lock does not exist"
exit 1
fi
restore-and-install:
needs: cache-pixi-lock
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
path: pixi-lock
- name: Copy test files to working directory
shell: bash
run: cp -r pixi-lock/ci/test/* .
- name: Restore pixi.lock from cache
uses: ./pixi-lock/restore
with:
cache-key: ${{ needs.cache-pixi-lock.outputs.cache-key }}
- name: Verify pixi.lock exists
shell: bash
run: |
if [ -f "pixi.lock" ]; then
echo "pixi.lock exists"
else
echo "pixi.lock does not exist"
exit 1
fi
- name: Setup pixi and install environment
uses: prefix-dev/setup-pixi@v0.9.3
with:
pixi-version: ${{ needs.cache-pixi-lock.outputs.pixi-version }}
- name: Verify environment installed
shell: bash
run: |
if [ -d ".pixi/envs/default" ]; then
echo "Environment installed successfully"
else
echo "Environment not installed"
exit 1
fi