-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (66 loc) · 1.9 KB
/
regressions.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
name: Regressions
on:
push:
pull_request:
branches:
- master
workflow_dispatch:
inputs:
to_upgrade:
description: 'The dependency to upgrade and compare: repository@branch'
required: true
default: 'git+https://github.com/mkdocs/mkdocs.git@master'
jobs:
collect_projects:
runs-on: ubuntu-latest
outputs:
projects: ${{ steps.projects.outputs.projects }}
steps:
- uses: actions/checkout@v4
- id: projects
shell: python
run: |
import json, os
projects = [d.replace('--', '/') for d in os.listdir('projects')]
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
print('projects=' + json.dumps(projects), file=f)
regressions:
needs: collect_projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
repo: ${{ fromJson(needs.collect_projects.outputs.projects) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup
run: ./build.sh setup ${{ matrix.repo }}
- name: Build current version
run: ./build.sh build_current ${{ matrix.repo }}
- name: Build latest version
run: ./build.sh build_latest ${{ matrix.repo }} ${{ github.event.inputs.to_upgrade }}
- name: Compare sites
run: ./build.sh compare ${{ matrix.repo }}
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout regressions
uses: actions/checkout@v4
with:
path: mkdocs-regressions
- name: Checkout catalog
uses: actions/checkout@v4
with:
repository: mkdocs/catalog
path: mkdocs-catalog
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Print project coverage
run: python mkdocs-regressions/coverage.py