Regressions #95
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: 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@v4 | |
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@v4 | |
with: | |
python-version: '3.11' | |
- name: Print project coverage | |
run: python mkdocs-regressions/coverage.py |