-
Notifications
You must be signed in to change notification settings - Fork 5
67 lines (58 loc) · 1.7 KB
/
newbuildandtestpyaqsapi.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
name: new_build_and_test_pyaqsapi
run-name: A push event from ${{ github.actor }} caused a rebuilding and retesting of the pyaqsapi package via GitHub actions
on:
push:
branches:
- main
- github_workflow
pull_request:
branches:
- main
- github_workflow
jobs:
setup_environment:
runs-on: ubuntu-latest
env:
AQSkey: ${{ secrets.AQSKEY }}
AQSuser: ${{ secrets.AQSUSER }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: setup environment
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.yml
init-shell: >-
bash
powershell
cache-environment: true
environment-name: pyaqsapi
post-cleanup: 'all'
shell: pwsh
- name: Display Python and sphinx version and system info
run: |
python -c "import platform; print(platform.uname())"
sphinx-build --version
- name: build and install pyaqsapi in a test environment using python-build and pip
run: |
python -m build .
pip install .
- name: build apidocs
run: |
cd docs
make clean
sphinx-apidoc --ext-autodoc -o . ../pyaqsapi/
make html
- name: test_package
env:
AQSkey: ${{ secrets.AQSKEY }}
AQSuser: ${{ secrets.AQSUSER }}
run: pytest