-
Notifications
You must be signed in to change notification settings - Fork 82
60 lines (46 loc) · 1.27 KB
/
validate-json.yml
File metadata and controls
60 lines (46 loc) · 1.27 KB
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
name: Test and Validate JSON
permissions:
contents: read
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
unit_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run TypeScript check
run: npm run typecheck
- name: Run linter
run: npm run lint
- name: Run tests
run: npm test
- name: Check formatting
run: npm run prettier
validate_json:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install dependencies
run: pip install jsonschema
- name: Validate Sepolia token list
run: jsonschema -i ./json/linea-sepolia-token-shortlist.json ./json/schema/l2-token-list-schema.json
- name: Validate Mainnet token list
run: jsonschema -i ./json/linea-mainnet-token-shortlist.json ./json/schema/l2-token-list-schema.json