-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
43 lines (37 loc) · 1.07 KB
/
lint_gamedb.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
name: 📝 Validate GameDB
on:
push:
branches-ignore:
- "l10n_master"
paths:
- '**/GameIndex.yaml'
pull_request:
branches:
- master
paths:
- '**/GameIndex.yaml'
jobs:
lint:
name: Lint and Validate GameDB
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Packages
run: |
npm install -g ajv-cli prettier
sudo apt-get -y install yamllint
- name: Validate YAML
run: |
yamllint -sd "{extends: relaxed, rules: {line-length: disable}}" ./bin/resources/GameIndex.yaml
- name: Validate Contents
run: |
ajv validate -s ./pcsx2/Docs/gamedb-schema.json --spec=draft2020 -d ./bin/resources/GameIndex.yaml
- name: Check Formatting
run: |
if ! prettier --check bin/resources/GameIndex.yaml; then
prettier --write bin/resources/GameIndex.yaml
echo "Prettier failed, diff:"
git diff bin/resources/GameIndex.yaml
exit 1
fi