Repository navigation
136 lines (102 loc) · 3.01 KB
/
Copy pathci.yaml
File metadata and controls
136 lines (102 loc) · 3.01 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: CI
on:
push:
branches:
- main
schedule:
- cron: '42 3 22 * *'
- cron: '13 1 14 * *'
workflow_dispatch:
jobs:
format-check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: '24'
- name: Install npm dependencies
run: npm ci
- name: Check formatting with Prettier
run: npm run prettier-check
type-check:
if: github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: '24'
- name: Install npm dependencies
run: npm ci
- name: Generate Wrangler types
run: npm run types
- name: Check TypeScript types
run: npm run check-types
integration-test:
if: github.event_name != 'schedule' || github.event.schedule == '42 3 22 * *'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: '24'
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: '3.12'
- name: Install npm dependencies
run: npm ci
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Create environment variables file
run: |
echo "IP_HASH_SALT=\"${{ secrets.IP_HASH_SALT }}\"" > .dev.vars
- name: Start Wrangler dev server
run: |
npm run dev -- --show-interactive-dev-session=false --port 8787 &
sleep 15
- name: Run API integration tests
run: |
curl -sL "${{ vars.GIST_TEST_SCRIPT }}" -o meteorites-api.py
python meteorites-api.py \
--remote "http://localhost:8787" \
--timeout 25 \
--delay 10 \
--max-radius 2500 \
--max-random 1000 \
--max-search 500
dataset-diff-check:
if: github.event_name != 'schedule' || github.event.schedule == '13 1 14 * *'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: '3.12'
- name: Check meteorites dataset differences
run: |
curl -sL "${{ vars.GIST_COMPARE_SCRIPT }}" -o meteorites-diff.py
python meteorites-diff.py \
--local-file "data/meteorites.csv" \
--remote-file "${{ vars.METEORITES_REMOTE_CSV }}" \
--timeout 40 \
--retries 3