-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (59 loc) · 2.06 KB
/
tox.yaml
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
name: Build
on:
pull_request:
branches: [develop]
push:
branches: [develop, master]
workflow_dispatch:
inputs:
reason:
description: Why did you trigger the pipeline?
required: False
default: Check if it runs again due to external changes
jobs:
build:
runs-on: ubuntu-latest
steps:
# pandoc needed for docu, see https://nbsphinx.readthedocs.io/en/0.7.1/installation.html?highlight=pandoc#pandoc
- name: Install Non-Python Packages
run: sudo apt-get update -yq && sudo apt-get -yq install pandoc
- uses: actions/[email protected]
with:
fetch-depth: 0
lfs: true
persist-credentials: false
# lfs=true is not enough, see https://stackoverflow.com/questions/61463578/github-actions-actions-checkoutv2-lfs-true-flag-not-converting-pointers-to-act
- name: Checkout LFS Objects
run: git lfs pull
- name: Merge Develop into Current Branch
if: github.ref != 'refs/heads/develop'
run: |
git fetch origin develop:develop --update-head-ok
git merge develop
- name: Setup Python 3.8
uses: actions/setup-python@v1
with:
python-version: "3.8"
# NOTE: Using a cache action is not worth it: Creating/restoring the cache takes longer than installing the packages
- name: Free disk space
run: sh build_scripts/free_disk_space.sh
- name: Install Tox and Python Packages
run: pip install tox
- name: Run Tox
run: tox
- name: Prepare Pages
if: github.ref == 'refs/heads/develop'
run: |
mv docs/build/* public/docs
mv htmlcov/* public/coverage
- name: Deploy Pages
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/develop'
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: public
TARGET_FOLDER: .
CLEAN: true
SINGLE_COMMIT: true
# post-cache action is executed at the end