Generate workflow files with a Jinja template #58
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", "generate_workflows" ] | |
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) | |
- name: Ensure workflows are up to date | |
if: matrix.tox-environment == 'generate_workflows' | |
run: git diff --exit-code || (echo 'Workflow files are out of date, please run "tox -e generate_workflows" and commit the changes in this PR.' && exit 1) |