-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (39 loc) · 1.52 KB
/
testing.yml
File metadata and controls
43 lines (39 loc) · 1.52 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
name: Testing
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Pixi (installs pixi + caches envs) # https://github.com/marketplace/actions/setup-pixi
uses: prefix-dev/setup-pixi@v0.9.3 # pin the action version
with:
pixi-version: v0.67.0 # pin the pixi binary version (optional)
cache: true # enable caching of installed envs
# only write new caches on main pushes (optional)
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
# ensure the 'tests' environment(s) are installed
environments: tests
# don't activate env (we'll call pixi run -e tests explicitly later)
activate-environment: false
# prefer using existing lockfile if present (faster, deterministic)
locked: true
- name: Verify pixi and run tests
run: |
pixi --version
pixi run -e tests tests -v
test-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.3
with:
pixi-version: v0.67.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
environments: tests
activate-environment: false
locked: true
- name: Run doc snippet tests
run: pixi run -e tests test-docs