Skip to content

Commit 1956c89

Browse files
committed
Added unit-browser tests to pages
1 parent de70d6b commit 1956c89

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

.github/workflows/build-and-deploy-pages.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
name: Build and Deploy pages to GitHub Pages
2-
on:
3-
push:
4-
branches:
5-
- master
6-
- pages
7-
pull_request:
8-
workflow_dispatch:
2+
on: [push, pull_request, workflow_dispatch]
93

104
permissions:
115
contents: read
@@ -22,11 +16,17 @@ jobs:
2216
uses: actions/checkout@v4
2317
with:
2418
fetch-depth: 0
25-
2619
- name: Get branch list and set output
2720
id: set-branches
2821
run: |
29-
BRANCHES=$(git branch -r | sed 's/^[ *]*//' | grep -v 'HEAD' | sed 's/^origin\///' | grep -v 'v1' | grep -v 'v2' | jq -R . | jq -cs)
22+
BRANCHES=$(
23+
git branch -r |
24+
grep -Ev 'HEAD|v1|v2' |
25+
sed 's/^[ *]*//' |
26+
sed 's/^origin\///' |
27+
jq -R . |
28+
jq -cs
29+
)
3030
echo "branches=$BRANCHES" >> "$GITHUB_OUTPUT"
3131
3232
build-compat-pages:
@@ -47,15 +47,20 @@ jobs:
4747
- run: npm ci
4848
- run: git checkout ${{ matrix.branch }}
4949
- run: npm run build-compat
50+
- run: npm run bundle
5051
- name: Prepare build artifacts
5152
run: |
52-
mkdir -p compat/${{ matrix.branch }}
53-
cp tests/compat/index.html tests/compat/compat-data.js tests/compat/tests.js tests/compat/browsers-runner.js compat/${{ matrix.branch }}
53+
mkdir -p ${{ matrix.branch }}/compat
54+
cp tests/compat/index.html tests/compat/compat-data.js tests/compat/tests.js tests/compat/browsers-runner.js ${{ matrix.branch }}/compat
55+
mkdir -p ${{ matrix.branch }}/bundles
56+
cp tests/bundles/* ${{ matrix.branch }}/bundles
57+
mkdir -p ${{ matrix.branch }}/unit-browser
58+
cp tests/unit-browser/* ${{ matrix.branch }}/unit-browser
5459
- name: Upload artifacts for branch ${{ matrix.branch }}
5560
uses: actions/upload-artifact@v4
5661
with:
5762
name: ${{ matrix.branch }}
58-
path: compat/${{ matrix.branch }}
63+
path: ${{ matrix.branch }}
5964

6065
combine-pages-and-deploy:
6166
needs: build-compat-pages
@@ -68,7 +73,7 @@ jobs:
6873
- name: Download artifacts
6974
uses: actions/download-artifact@v4
7075
with:
71-
path: pages/compat
76+
path: pages
7277
- run: cp -r docs/ pages/
7378
- name: Setup Pages
7479
uses: actions/configure-pages@v5

0 commit comments

Comments
 (0)