-
Notifications
You must be signed in to change notification settings - Fork 8
68 lines (56 loc) · 1.63 KB
/
on_master_commits.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
name: calculate coverage
on:
push:
branches:
- master
jobs:
# Calculates new coverage for the base branch
calc_coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # need this so tags are pulled and versions work
- name: Install obsplus
uses: ./.github/actions/install-obsplus
with:
python-version: "3.12"
- name: run test suite
shell: bash -l {0}
run: |
pytest -s --cov obsplus --cov-report=xml
# upload coverage
- name: upload coverage
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: PR_tests
fail_ci_if_error: false
update_gh_pages:
# Build new documentation for latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # need this so tags are pulled and versions work
- name: Install obsplus
uses: ./.github/actions/install-obsplus
with:
python-version: "3.12"
- name: git config
shell: bash -l {0}
run: |
git config --global user.email "[email protected]"
git config --global user.name "GithubActions"
- name: build docs
shell: bash -l {0}
run: |
python scripts/stage_docs.py --remove-dirty
- name: push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
directory: ../obsplus_documentation