-
Notifications
You must be signed in to change notification settings - Fork 607
61 lines (54 loc) · 1.97 KB
/
misc.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
name: Misc tests
on:
push:
branches-ignore:
- 'release/*'
pull_request:
env:
CORE_REPO_SHA: 141a6a2e473ef7f0ec4915dfb71e3c0fa595283e
jobs:
misc:
strategy:
fail-fast: false
matrix:
tox-environment: [ "docker-tests", "spellcheck", "docs", "generate" ]
name: ${{ matrix.tox-environment }}
runs-on: ubuntu-20.04
steps:
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install tox
run: pip install tox
- name: Cache tox environment
# Preserves .tox directory between runs for faster installs
uses: actions/cache@v4
with:
path: |
.tox
~/.cache/pip
key: v7-misc-tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt', 'gen-requirements.txt', 'docs-requirements.txt') }}
- name: run tox
run: tox -e ${{ matrix.tox-environment }}
- name: Ensure generated code is up to date
if: matrix.tox-environment == 'generate'
run: git diff --exit-code || (echo 'Generated code is out of date, please run "tox -e generate" and commit the changes in this PR.' && exit 1)
check-tests:
name: check-tests
runs-on: ubuntu-latest
steps:
- name: Checkout Contrib Repo @ SHA - {{ github.sha }}
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install jinja
run: pip install jinja
- name: Run tests workflow generator
run: python .github/workflows/generate_tests.py
- name: Check tests workflow for updates
run: git diff --exit-code || (echo '.github/workflows/tests.yml is out of date, please run "python .github/workflows/generate_tests.py" and commit the changes in this PR.' && exit 1)