-
Notifications
You must be signed in to change notification settings - Fork 18
64 lines (54 loc) · 1.65 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
name: CI
on:
push:
pull_request:
schedule:
# Weekly Tuesday 6 AM build
# * is a special character in YAML so you have to quote this string
- cron: '0 6 * * 2'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
initial_checks:
name: Mandatory checks before CI
runs-on: ubuntu-latest
steps:
- name: Check base branch
uses: actions/github-script@v7
if: github.event_name == 'pull_request'
with:
script: |
const allowed_basebranch = 'master';
const pr = context.payload.pull_request;
if (pr.base.ref !== allowed_basebranch) {
core.setFailed(`PR opened against ${pr.base.ref}, not ${allowed_basebranch}`);
} else {
core.info(`PR opened correctly against ${allowed_basebranch}`);
}
tests:
needs: initial_checks
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
setenv: |
jref: "https://ssb.stsci.edu/trds_open/jref"
submodules: false
coverage: ''
envs: |
- name: Lint with flake8
linux: codestyle
# Make sure that packaging will work
- name: pep517 build
linux: twine
- name: Security audit
linux: bandit
- name: Check links
linux: linkcheck
- name: Python 3.9 with remote data and all dependencies
linux: py39-test-alldeps
posargs: --remote-data -v
- name: Python 3.12 with remote data and dev dependencies
linux: py312-test-devdeps
posargs: --remote-data -v