Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,19 @@ jobs:
./wpt/wpt manifest
./wpt/wpt serve --inject-script=${{ github.workspace }}/dist/container-query-polyfill.modern.js &
npm test
ret=$(node --loader ts-node/esm ./tests/diff.ts)
npm run prettier:fix
cat ./tests/pr.txt >> $GITHUB_STEP_SUMMARY
if [ $ret == "changed" ]; then
exit 1
fi
- uses: actions/upload-artifact@v3
with:
name: baseline.json
path: ./tests/baseline.json
if: failure()
- uses: actions/upload-artifact@v3
with:
name: results.json
path: ./tests/results.json
if: failure()
36 changes: 36 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: release-please

on:
push:
branches:
- x-rework-test-results

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
package-name: container-query-polyfill

- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
if: ${{ steps.release.outputs.release_created }}
- run: npm install
if: ${{ steps.release.outputs.release_created }}
- run: npm run build
if: ${{ steps.release.outputs.release_created }}

- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://wombat-dressing-room.appspot.com/'
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
63 changes: 63 additions & 0 deletions .github/workflows/update_baseline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Update WPT Baseline

on:
workflow_dispatch:
branches: [main]
schedule:
- cron: '0 0 * * 1'

jobs:
build:
runs-on: ubuntu-latest
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
WPT_MANIFEST: ${{ github.workspace }}/wpt/MANIFEST.json
SCHEDULED_BASELINE_DIFF: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- uses: actions/setup-python@v3
with:
python-version: '3.x'
- uses: actions/checkout@v3
with:
repository: devknoll/wpt
path: wpt
ref: x-polyfill-all-tests

- name: Build
run: |
npm install
npm run build:wpt

- name: Setup WPT
run: |
cd wpt
pip install virtualenv
./wpt make-hosts-file | sudo tee -a /etc/hosts
- name: Run Tests
run: |
npm run serve &
./wpt/wpt manifest
./wpt/wpt serve --inject-script=${{ github.workspace }}/dist/container-query-polyfill.modern.js &
npm test

- name: Open Pull Request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ret=(node --loader ts-node/esm ./tests/diff.ts)
if [ $ret == "unchanged" ]; then
exit 0
fi
npm run prettier:fix
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git checkout -b update-wpt-baseline-$(date +"%Y-%m-%d")
git add ./tests/baseline.json
git commit -m "Update Web Platform Test baseline"
git push -u origin HEAD
gh pr create --title "[Automated] Update Web Platform Tests" --body-file ./tests/pr.txt --label "update-baseline"
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dist/
dist/
wpt/
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

## [1.0.1](https://github.com/devknoll/container-query-polyfill/compare/v1.0.0...v1.0.1) (2022-10-06)


### Bug Fixes

* Add weekly baseline testing ([668639a](https://github.com/devknoll/container-query-polyfill/commit/668639a7295b6957fce7a5a83f14ef1e46a93263))
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "container-query-polyfill",
"version": "1.0.0",
"version": "1.0.1",
"description": "",
"repository": "github:GoogleChromeLabs/container-query-polyfill",
"repository": {
"type": "git",
"url": "https://github.com/GoogleChromeLabs/container-query-polyfill.git"
},
"type": "module",
"module": "dist/container-query-polyfill.modern.js",
"unpkg": "dist/container-query-polyfill.modern.js",
Expand Down
6 changes: 5 additions & 1 deletion src/wpt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ export function initializeForWPT() {
return new Promise<void>(resolve => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
resolve();
requestAnimationFrame(() => {
requestAnimationFrame(() => {
resolve();
});
});
});
});
});
Expand Down
Loading