forked from Iota-School/notebooks-for-all
-
Notifications
You must be signed in to change notification settings - Fork 1
109 lines (102 loc) · 2.95 KB
/
pixi.yml
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
104
105
106
107
108
109
name: test with pixi
on:
push:
branches: [main]
pull_request:
branches: ["*"]
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
PYTHONUNBUFFERED: "1"
PIP_DISABLE_PIP_VERSION_CHECK: "1"
USE_PIXI_VERSION: 0.22.0
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.6.0
with:
pixi-version: v${{ env.USE_PIXI_VERSION }}
cache: true
environments: build
- run: pixi run -ve build build
- uses: actions/upload-artifact@v4
with:
name: nbconvert-a11y-${{ github.run_number }}-dist
path: ./dist
test:
name: (${{ matrix.os }}) test
needs: [build]
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: ["ubuntu"]
# add matrix for browsers later on
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.6.0
with:
pixi-version: v${{ env.USE_PIXI_VERSION }}
cache: true
environments: test
- uses: actions/download-artifact@v4
with:
name: nbconvert-a11y-${{ github.run_number }}-dist
path: ./dist
# need to make this install from the wheel
- run: pixi run -ve test test
- if: always()
uses: actions/upload-artifact@v4
with:
name: |-
nbconvert-a11y-${{ github.run_number }}-${{ matrix.os }}-test
path: |
./.pixi/task-cache-v0
./build/reports
docs:
name: docs
needs: [test]
runs-on: ubuntu-latest
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.6.0
with:
pixi-version: v${{ env.USE_PIXI_VERSION }}
cache: true
environments: docs
- run: pixi run -ve docs build
- if: always()
uses: actions/upload-artifact@v4
with:
name: nbconvert-a11y-${{ github.run_number }}-site
path: site
publish:
name: publish the mkdocs build to github pages
needs: [docs]
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: nbconvert-a11y-${{ github.run_number }}-site
path: site
- name: Deploy main 🚀
uses: JamesIves/github-pages-deploy-action@v4
if: ${{ github.ref_name == 'main' }}
with:
folder: site # The folder the action should deploy.
single-commit: true
- name: Deploy non-main 🚀
uses: JamesIves/github-pages-deploy-action@v4
if: ${{ github.ref_name != 'main' }}
with:
folder: site # The folder the action should deploy.
single-commit: true
target-folder: branch/${{ github.ref_name }}