-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (65 loc) · 1.94 KB
/
ci_workflows.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
# GitHub Actions workflow for testing and continuous integration.
#
# This file performs testing using tox and tox.ini to define and configure the test environments.
name: CI
on:
push:
branches:
- main
pull_request:
# branches: # only build on PRs against 'main' if you need to further limit when CI is run.
# - main
# schedule: # schedule a regular run if needed
# # Weekly Monday 9AM build
# - cron: "0 9 * * 1"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
envs: |
- linux: check-style
- linux: check-security
- linux: build-dist
test:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
envs: |
- linux: test-oldestdeps
python-version: 3.11
- linux: test
python-version: 3.11
- linux: test-alldeps
python-version: 3.11
- macos: test-alldeps
python-version: 3.11
- windows: test-alldeps
python-version: 3.11
- linux: test-alldeps-cov
coverage: codecov
build-docs:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
cache-path: docs/_build/html
cache-key: docs-${{ github.run_id }}
envs: |
- linux: build-docs
deploy-docs:
runs-on: ubuntu-latest
needs: build-docs
steps:
- name: Download docs artifact
uses: actions/cache@v3
with:
path: docs/_build/html
key: docs-${{ github.run_id }}
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
force_orphan: true