Skip to content

Commit

Permalink
Merge pull request #108 from NYPL/DR-2912-enable-github-actions-for-s…
Browse files Browse the repository at this point in the history
…wimlanes-test

DR 2912 Enable GitHub Actions to run homepage swimlanes test automatically
  • Loading branch information
croyfish authored Apr 9, 2024
2 parents cbbedc8 + 3ae096e commit 82f08f3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/swimlanes_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Run Swimlanes Test

on:
schedule:
- cron: '*/10 * * * *'

jobs:
run_swimlanes_test:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Install dependencies
run: npm install

- name: Run Puppeteer script
run: npm run homepageImageloadingTestProd

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- update links to legacy dc in qa to point to https://digitalcollections.nypl.org (DR-2858)
- Reenable underline hover state on 'Explore further' card titles (DR-2834)
- Use Repo API v2/items/counts endpoint in DC Facelift (DR-2824)
- Enable GitHub Actions to run homepage swimlanes test automatically (DR-2912)

### Removed

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ npm run test
To run the homepage swimlane image loading test script against the qa environment, run

```
npm run hompageImageLoadingTest
npm run hompageImageLoadingTestQa
```
(requires accessination with nypl-dams-dev)

To run the same test script against the production environment, run
```
npm run hompageImageLoadingTest --prod
npm run hompageImageLoadingTestProd
```

The test waits for the 24 swim lane images to load, including the 12 that load after scrolling, and has succeeded if it does not time out. It simulates a single user loading the homepage one time.
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"test": "jest",
"test:ci": "jest --ci --config=jest.config.ts",
"prepare": "husky install",
"hompageImageLoadingTest": "node test/homepageImageLoadingTest.js"
"hompageImageLoadingTestQa": "node test/homepageImageLoadingTest.js",
"hompageImageLoadingTestProd": "node test/homepageImageLoadingTest.js --prod"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
Expand Down

0 comments on commit 82f08f3

Please sign in to comment.