-
Notifications
You must be signed in to change notification settings - Fork 19
65 lines (55 loc) · 1.76 KB
/
ci_workflows.yml
File metadata and controls
65 lines (55 loc) · 1.76 KB
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
name: CI
on:
push:
pull_request:
workflow_dispatch:
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@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
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@2835f0cacddf3f8de198db9afdb5354a5cebe0ef # v2.6.3
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.10 with remote data and all dependencies
linux: py310-test-alldeps
posargs: --remote-data -v
- name: Python 3.14 with remote data and dev dependencies
linux: py314-test-devdeps
posargs: --remote-data -v