Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move wkorg screenshot test from CircleCI to GitHub actions #8135

Merged
merged 4 commits into from
Oct 21, 2024
Merged
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
38 changes: 0 additions & 38 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,44 +201,6 @@ jobs:
command: .circleci/slack-notification.sh


wkorg_nightly:
docker:
- image: scalableminds/puppeteer:fix_wk_nightly
resource_class: large
steps:
- checkout
- run:
name: Install dependencies
command: |
yarn install --immutable

- run:
name: Assert GZIP
command: |
# Test gzipped assets
curl -s -I -H "Accept-Encoding: gzip" https://webknossos.org/assets/bundle/main.js | grep -q "content-encoding: gzip"
curl -s -I -H "Accept-Encoding: gzip" https://webknossos.org/assets/bundle/main.css | grep -q "content-encoding: gzip"
# Test gzipped buckets
curl -s -i \
-H 'accept: application/octet-stream' \
-H 'Accept-Encoding: gzip' \
-H 'content-type: application/json' \
--data-raw '[{"position":[2752,4320,1728],"additionalCoordinates":[],"mag":[1,1,1],"cubeSize":32,"fourBit":false}]' \
'https://data-humerus.webknossos.org/data/datasets/scalable_minds/l4dense_motta_et_al_demo/layers/segmentation/data?token=' \
| grep -q "content-encoding: gzip"
echo Success.

- run:
name: Run screenshot-tests
command: |
# CircleCI cancels the job after 60 minutes. To ensure that screenshots are still
# uploaded as artifacts, we define a timeout of 50 minutes for the screenshot tests.
timeout 3000 \
yarn test-wkorg-screenshot

- store_artifacts:
path: frontend/javascripts/test/screenshots-wkorg

workflows:
version: 2
circleci_build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- cron: '0 0 * * *'

jobs:
nightly:
nightly-screenshot-tests:
runs-on: ubuntu-latest

steps:
Expand Down
43 changes: 42 additions & 1 deletion .github/workflows/wkorg-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,45 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3


- uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: |
corepack enable && yarn install --immutable

- name: Run screenshot tests
run: |
yarn test-wkorg-screenshot
env:
URL: https://webknossos.org/
WK_AUTH_TOKEN: ${{ secrets.WK_AUTH_TOKEN }}
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY : ${{ secrets.BROWSERSTACK_ACCESS_KEY }}

- name: Upload screenshots as artifact
uses: actions/upload-artifact@v3
with:
name: screenshots
path: frontend/javascripts/test/screenshots-wkorg


nightly-gzip-test:
runs-on: ubuntu-latest

steps:
- name: Assert GZIP is enabled
run: |
# Test gzipped assets
curl -s -I -H "Accept-Encoding: gzip" https://webknossos.org/assets/bundle/main.js | grep -q "content-encoding: gzip"
curl -s -I -H "Accept-Encoding: gzip" https://webknossos.org/assets/bundle/main.css | grep -q "content-encoding: gzip"
# Test gzipped buckets
curl -s -i \
-H 'accept: application/octet-stream' \
-H 'Accept-Encoding: gzip' \
-H 'content-type: application/json' \
--data-raw '[{"position":[2752,4320,1728],"additionalCoordinates":[],"mag":[1,1,1],"cubeSize":32,"fourBit":false}]' \
'https://data-humerus.webknossos.org/data/datasets/scalable_minds/l4dense_motta_et_al_demo/layers/segmentation/data?token=' \
| grep -q "content-encoding: gzip"
echo Success.
3 changes: 2 additions & 1 deletion CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
### Changed
- Some mesh-related actions were disabled in proofreading-mode when using meshfiles that were created for a mapping rather than an oversegmentation. [#8091](https://github.com/scalableminds/webknossos/pull/8091)
- Admins can now see and cancel all jobs. The owner of the job is shown in the job list. [#8112](https://github.com/scalableminds/webknossos/pull/8112)
- Migrated nightlx screenshot tests from CircleCI to GitHub actions. [#8134](https://github.com/scalableminds/webknossos/pull/8134)
- Migrated nightly screenshot tests from CircleCI to GitHub actions. [#8134](https://github.com/scalableminds/webknossos/pull/8134)
- Migrated nightly screenshot tests for wk.org from CircleCI to GitHub actions. [#8135](https://github.com/scalableminds/webknossos/pull/8135)

### Fixed
- Fixed a bug during dataset upload in case the configured `datastore.baseFolder` is an absolute path. [#8098](https://github.com/scalableminds/webknossos/pull/8098) [#8103](https://github.com/scalableminds/webknossos/pull/8103)
Expand Down