-
Notifications
You must be signed in to change notification settings - Fork 64
49 lines (46 loc) · 1.36 KB
/
ci.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
name: CI
on:
push:
branches: ["master", "src-layout"]
pull_request:
branches: ["master", "src-layout"]
schedule:
- cron: "0 12 1 * *"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
generate-compatibility-matrix:
name: >-
Check for any uncommitted
table alteration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: '.python-versions-used'
- name: Install dependencies
run: |
python -m pip install -r requirements.txt
- name: Generate compatibility matrix with nox
continue-on-error: true
run: |
python -m nox --report report.json
- name: Verify table has not been altered
run: |
set -xeEuo pipefail
cat report.json
python report_to_table.py
git diff table.md
DIFF_FOR_TABLE=$(git diff table.md)
echo "DIFF_FOR_TABLE=$DIFF_FOR_TABLE" >> $GITHUB_OUTPUT
id: verify-table
- name: Fail the job if the committed table differs from the calculated one
if: steps.verify-table.outputs.DIFF_FOR_TABLE != ''
run: |
echo "::error file=table.md::Table has been altered but not committed!"
exit 1