-
Notifications
You must be signed in to change notification settings - Fork 20
91 lines (75 loc) · 2.25 KB
/
ci-test.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
name: CI-Test
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
test:
name: Tests
runs-on: ${{ matrix.host-os }}
needs: lint
strategy:
matrix:
host-os: ["ubuntu-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
fail-fast: false
steps:
- name: Set env.REPOSITORY_NAME # just the repo, as opposed to org/repo
run: |
export REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}
echo "REPOSITORY_NAME=${REPOSITORY_NAME}" >> $GITHUB_ENV
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
set -vxeuo pipefail
bash ./scripts/install-deps.sh
ls -Al .
ls -Al ./dist/
tree .
- uses: actions/upload-artifact@v3
with:
name: ${{ env.REPOSITORY_NAME }}-wheels
path: dist/*.whl
- name: Test with pytest
run: |
set -vxeuo pipefail
bash ./scripts/run-tests.sh
docs:
name: Documentation
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
python-version: [3.8]
fail-fast: false
steps:
- name: Set env.REPOSITORY_NAME # just the repo, as opposed to org/repo
run: |
export REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}
echo "REPOSITORY_NAME=${REPOSITORY_NAME}" >> $GITHUB_ENV
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
set -vxeuo pipefail
bash ./scripts/install-deps.sh
- name: Build Docs
run: |
set -vxeuo pipefail
bash ./scripts/build-docs.sh
- uses: actions/upload-artifact@v3
with:
name: ${{ env.REPOSITORY_NAME }}-docs
path: docs/build/html/