-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (43 loc) · 1.67 KB
/
Copy pathci.yml
File metadata and controls
48 lines (43 loc) · 1.67 KB
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
name: CI
# Runs on every push and pull request: validates the impact dataset against its
# schemas, checks the derived statistics and charts are in sync with the
# records, and builds the site.
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
impact-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
# From requirements.txt rather than a hand-kept list: the two drifted
# once already, and CI is where that surfaces as a mystery.
- run: pip install -r requirements.txt
- name: Validate the impact dataset
run: python -m tools.impact.run validate
- name: Check statistics and charts match the records
# The tests fail if stats.json or any chart is stale, so a data change
# cannot be merged without its derived outputs.
run: python -m unittest discover -s tools/impact/tests -t . -v
site:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
# Pinned low on purpose. The site is built with the github-pages
# gem, which pins liquid 4.0.3 -- and liquid 4.0.3 calls
# Object#tainted?, removed in Ruby 3.2. Its jekyll 3.9.0 also predates
# the Psych 4 shipped with Ruby 3.1. Ruby 3.0 is the newest that
# satisfies both, so it is what GitHub Pages itself effectively builds
# with; raising it here breaks the build without touching the site.
ruby-version: "3.0"
bundler-cache: true
- name: Build the site
run: bundle exec jekyll build --trace