-
Notifications
You must be signed in to change notification settings - Fork 1.1k
81 lines (67 loc) · 2.41 KB
/
continuous-integration.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
name: osu-wiki continuous integration
on:
pull_request:
branches:
- master
types:
- opened
- reopened
- synchronize
- edited
jobs:
ci:
name: changed files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: create master branch from remote master
run: git branch master origin/master
- name: 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
run: xargs -0r meta/check-file-sizes.sh <"$CHANGED_FILES"
- name: set up Node.js
id: setup-node
uses: actions/setup-node@v3
with:
cache: npm
node-version: 20
- name: load node_modules from cache
id: cache-node-modules
uses: actions/cache@v3
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: run remark on changed files
if: ${{ !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: set up Python
uses: actions/setup-python@v4
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: run yamllint on .yaml and .md files
run: osu-wiki-tools check-yaml
- name: find broken wikilinks
if: ${{ !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: ${{ !contains(github.event.pull_request.body, 'SKIP_OUTDATED_CHECK') }}
run: |
osu-wiki-tools check-outdated-articles \
--base-commit HEAD \
--no-recommend-autofix \
--outdated-since "$(git log --format=%H master.. | tail -n 1)"