Skip to content

Commit 3adb302

Browse files
committed
Added unit-browser tests to pages
1 parent de70d6b commit 3adb302

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

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

Lines changed: 12 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,11 @@ 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=$(git branch -r | grep -v 'HEAD' | grep -v 'v1' | grep -v 'v2' \
23+
| sed 's/^[ *]*//' | sed 's/^origin\///' | jq -R . | jq -cs)"
3024
echo "branches=$BRANCHES" >> "$GITHUB_OUTPUT"
3125
3226
build-compat-pages:
@@ -47,15 +41,20 @@ jobs:
4741
- run: npm ci
4842
- run: git checkout ${{ matrix.branch }}
4943
- run: npm run build-compat
44+
- run: npm run bundle
5045
- name: Prepare build artifacts
5146
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 }}
47+
mkdir -p ${{ matrix.branch }}/compat
48+
cp tests/compat/index.html tests/compat/compat-data.js tests/compat/tests.js tests/compat/browsers-runner.js ${{ matrix.branch }}/compat
49+
mkdir -p ${{ matrix.branch }}/bundles
50+
cp tests/bundles/* ${{ matrix.branch }}/bundles
51+
mkdir -p ${{ matrix.branch }}/unit-browser
52+
cp tests/unit-browser/* ${{ matrix.branch }}/unit-browser
5453
- name: Upload artifacts for branch ${{ matrix.branch }}
5554
uses: actions/upload-artifact@v4
5655
with:
5756
name: ${{ matrix.branch }}
58-
path: compat/${{ matrix.branch }}
57+
path: ${{ matrix.branch }}
5958

6059
combine-pages-and-deploy:
6160
needs: build-compat-pages
@@ -68,7 +67,7 @@ jobs:
6867
- name: Download artifacts
6968
uses: actions/download-artifact@v4
7069
with:
71-
path: pages/compat
70+
path: pages
7271
- run: cp -r docs/ pages/
7372
- name: Setup Pages
7473
uses: actions/configure-pages@v5

0 commit comments

Comments
 (0)