-
Notifications
You must be signed in to change notification settings - Fork 48
90 lines (73 loc) · 2.2 KB
/
test_latex_template.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: "Test LaTeX Template"
on:
pull_request:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "0 13 * * 1"
jobs:
pre-commit:
name: Check linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
nix-test:
name: Test template sheets against pre-compiled examples
needs: pre-commit
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- name: Set up Nix
uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build test sheets
id: build-sheets-test
run: make test_ci
- name: Install Imagemagick
uses: mfinelli/setup-imagemagick@v5
- name: Install Ghostscript
run: sudo apt-get install ghostscript -y
- name: Compare test sheets with reference
run: make validate_test
- name: Copy output to archive directory
if: always() && steps.build-sheets-test.conclusion == 'success'
run: |
mkdir archive
cp -rL ./result/* ./archive
cp difference* ./archive
- name: Archive build artifacts
if: always() && steps.build-sheets-test.conclusion == 'success'
uses: actions/upload-artifact@v4
with:
name: test_result
path: archive
nix-run:
name: Build repo character sheets
needs: nix-test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- name: Set up NixOS
uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Run nix flake check
run: make check
- name: Run nix build
run: make build_ci
- name: Copy output to archive directory
run: |
mkdir archive
cp -r ./result/* ./archive
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: result
path: archive