-
Notifications
You must be signed in to change notification settings - Fork 321
50 lines (45 loc) · 1.73 KB
/
prerelease.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
name: Scheduled pre-release tests
on:
schedule:
# Run this workflow twice a week
# ref: https://crontab.guru/#0_5_*_*_1,4
- cron: "0 5 * * 1,4"
workflow_dispatch:
env:
FORCE_COLOR: "1" # Make tools pretty
PIP_DISABLE_PIP_VERSION_CHECK: "1" # Don't check for pip updates
jobs:
prerelease:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: "Checkout repository 🛎"
uses: actions/checkout@v4
- name: "Setup CI environment 🛠"
uses: ./.github/actions/set-dev-env
with:
python-version: ${{ matrix.python-version }}
pandoc: true
- name: "Install (prerelease) dependencies 📦"
run: |
python -Im pip install --upgrade pip wheel setuptools
- name: "Build PST docs and check for warnings 📖"
run: |
# example substitution: tox run -e docs-py312-docs
python -Im tox run -e docs-py$(echo ${{ matrix.python-version }} | tr -d .)-docs -- --keep-going
- name: "Run tests ✅ (no coverage)"
run: |
# this will compile the assets then run the tests
python -Im tox run -e compile-assets,i18n-compile,py$(echo ${{ matrix.python-version }} | tr -d .)-tests-no-cov
echo "PYTEST_ERRORS=$?" >> $GITHUB_ENV
# If either the docs build or the tests resulted in an error, create an issue to note it
- name: "Create an issue if failure"
uses: JasonEtco/create-an-issue@v2
if: ${{ env.SPHINX_BUILD_UNEXPECTED_WARNINGS || !env.PYTEST_ERRORS }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/prerelease-template.md