Skip to content

Commit 75d1479

Browse files
committed
Add CDN detection tests to CI workflow
Split CI into three parallel jobs: - build: Xcode build on macOS - test: Node.js lint and CDN detection tests on Ubuntu - validate: Python manifest validation on Ubuntu Each job explicitly sets up its runtime (Node LTS, Python 3.x) for consistent, reproducible builds.
1 parent 466fec4 commit 75d1479

1 file changed

Lines changed: 35 additions & 19 deletions

File tree

.github/workflows/ci.yml

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
jobs:
1010
build:
1111
runs-on: macos-latest
12-
1312
steps:
1413
- name: Checkout
1514
uses: actions/checkout@v4
@@ -23,6 +22,41 @@ jobs:
2322
CODE_SIGN_IDENTITY="-" \
2423
CODE_SIGNING_REQUIRED=NO
2524
25+
test:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: lts/*
35+
36+
- name: Lint JavaScript
37+
run: |
38+
for file in "CF Cache Status/CF Cache Status Extension/Resources/"*.js \
39+
"CF Cache Status/CF Cache Status Extension/"*.js; do
40+
if [ -f "$file" ]; then
41+
echo "Checking: $file"
42+
node --check "$file"
43+
fi
44+
done
45+
46+
- name: Run CDN detection tests
47+
run: node tests/cdn-detection.test.js
48+
49+
validate:
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@v4
54+
55+
- name: Setup Python
56+
uses: actions/setup-python@v5
57+
with:
58+
python-version: '3.x'
59+
2660
- name: Validate manifest.json
2761
run: |
2862
python3 -c "
@@ -43,21 +77,3 @@ jobs:
4377
print(f' Name: {manifest[\"name\"]}')
4478
print(f' Version: {manifest[\"version\"]}')
4579
"
46-
47-
- name: Lint JavaScript (syntax check)
48-
run: |
49-
for file in "CF Cache Status/CF Cache Status Extension/Resources/"*.js \
50-
"CF Cache Status/CF Cache Status Extension/"*.js; do
51-
if [ -f "$file" ]; then
52-
echo "Checking: $file"
53-
node --check "$file"
54-
fi
55-
done
56-
57-
- name: Setup Node.js
58-
uses: actions/setup-node@v4
59-
with:
60-
node-version: lts/*
61-
62-
- name: Run CDN detection tests
63-
run: node tests/cdn-detection.test.js

0 commit comments

Comments
 (0)