Add Resurrection Cup 2024 Concludes
news post
#48030
Workflow file for this run
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: osu-wiki continuous integration | |
on: | |
pull_request: | |
branches: | |
- master | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- edited | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ci: | |
name: changed files | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: create master branch from remote master | |
run: git branch master origin/master | |
- name: set up Node.js | |
id: setup-node | |
uses: actions/setup-node@v4 | |
with: | |
cache: npm | |
node-version: 20 | |
- name: load node_modules from cache | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: node-modules-${{ hashFiles('package-lock.json') }}-${{ steps.setup-node.outputs.node-version }} | |
- name: "if cache is outdated: install node.js dependencies" | |
if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }} | |
run: npm ci | |
- name: set up Python | |
uses: actions/setup-python@v5 | |
with: | |
cache: pip | |
cache-dependency-path: requirements.txt | |
python-version: "3.11" | |
- name: set up Python CI dependencies | |
run: pip install -r requirements.txt | |
- name: detect changed files | |
id: detect-changed-files | |
run: | | |
changed_files="$(mktemp)" | |
git diff --diff-filter=d --name-only --no-renames -z master >"$changed_files" | |
printf 'CHANGED_FILES=%s\n' "$changed_files" >>"$GITHUB_ENV" | |
- name: check file sizes | |
if: ${{ !cancelled() && steps.detect-changed-files.outcome == 'success' }} | |
run: xargs -0r meta/check-file-sizes.sh <"$CHANGED_FILES" | |
- name: run remark on changed files | |
if: ${{ !cancelled() && steps.detect-changed-files.outcome == 'success' }} | |
continue-on-error: ${{ contains(github.event.pull_request.body, 'SKIP_REMARK') }} | |
run: | | |
grep -z '\.md$' <"$CHANGED_FILES" | \ | |
REPORTER=vfile-reporter-github-action xargs -0r meta/remark.sh | |
- name: run yamllint on .yaml and .md files | |
if: ${{ !cancelled() && steps.detect-changed-files.outcome == 'success' }} | |
run: osu-wiki-tools check-yaml | |
- name: find broken wikilinks | |
if: ${{ !cancelled() && steps.detect-changed-files.outcome == 'success' }} | |
continue-on-error: ${{ contains(github.event.pull_request.body, 'SKIP_WIKILINK_CHECK') }} | |
run: osu-wiki-tools check-links --all | |
- name: check if translations are marked as outdated | |
if: ${{ !cancelled() && steps.detect-changed-files.outcome == 'success' }} | |
continue-on-error: ${{ contains(github.event.pull_request.body, 'SKIP_OUTDATED_CHECK') }} | |
run: osu-wiki-tools check-outdated-articles --no-recommend-autofix |