-
Notifications
You must be signed in to change notification settings - Fork 12
70 lines (64 loc) · 1.89 KB
/
ci.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
name: ci
on:
push:
pull_request:
schedule:
# See https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
# Run at 3:30 every 1st of the month
- cron: "30 3 1 * *"
jobs:
check-links:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
# link checker ignores json files
- name: Extract links from codes.json
run: |
echo "{" >> codes.json
grep homepage src/data/codes.json > codes.json
# make json valid
echo "\"dummy\": \"dummy\"}" >> codes.json
- name: Link Checker
id: lc
uses: lycheeverse/[email protected]
with:
# See cli args at https://github.com/lycheeverse/lychee#commandline-parameters
# for excluded URLs, the checker seems to be stricter than Chrome
args: >-
--verbose --timeout 40 --insecure
--exclude "https://www.msg.chem.iastate.edu/"
--exclude "http://openmopac.net/"
-- codes.json
fail: true
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
node-version: 14.x
- name: Install dependencies
run: npm install --include=dev
- name: Run ESLint
run: npx eslint 'src/**/*js'
validate-codes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: pip install -r .github/requirements.txt
- name: Validate code metadata
run: python .github/codes.py
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install and Build
run: |
npm install
npm run build