-
Notifications
You must be signed in to change notification settings - Fork 6
35 lines (30 loc) · 952 Bytes
/
python-package.yml
File metadata and controls
35 lines (30 loc) · 952 Bytes
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
# This workflow will install Python dependencies using mamba, run tests and check pre-commit
name: Python package
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 10
- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: 'latest'
init-shell: bash
generate-run-shell: true
environment-name: testenv
environment-file: environment.yml
- name: pre-commit
uses: pre-commit/action@v3.0.0
- name: Run pytest in micromamba environment
run: |
micromamba install -n testenv pytest
micromamba run -n testenv pytest --import-mode=importlib .
- name: Build docs
run: |
micromamba run -n testenv sphinx-build -n -b html docs/source/ docs/build/