diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index e531018..cfbd1e0 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -71,6 +71,12 @@ jobs: run: npm install - name: Test run: npm test + - name: Start server (in background) + run: npm run start & + - name: Lost Pixel + uses: lost-pixel/lost-pixel@v3.16.0 + env: + LOST_PIXEL_API_KEY: ${{ secrets.LOST_PIXEL_API_KEY }} deploy-site: needs: [test-site, test-models, test-data-model-validator, test-rpde-validator] diff --git a/lostpixel.config.js b/lostpixel.config.js new file mode 100644 index 0000000..1f2942f --- /dev/null +++ b/lostpixel.config.js @@ -0,0 +1,14 @@ +module.exports = { + pageShots: { + pages: [ + { path: '/', name: 'model-validator-home' }, + { path: '/rpde', name: 'rpde-validator-home' }, + { path: '/?url=https%3A%2F%2Fopenactive.io%2Fdata-models%2Fversions%2F2.x%2Fexamples%2Fsessionseries-split_example_1.json&version=2.x', name: 'sessionseries' }, + { path: '/?url=https%3A%2F%2Fopenactive.io%2Fdata-models%2Fversions%2F2.x%2Fexamples%2Fscheduledsession-split_example_1.json&version=2.x', name: 'scheduledsession' }, + ], + baseUrl: 'http://172.17.0.1:8080', + }, + lostPixelProjectId: 'clzitt4s52b6dlcoguswodrsj', + failOnDifference: true, + apiKey: process.env.LOST_PIXEL_API_KEY, +}; diff --git a/package.json b/package.json index a64c4fe..88276e5 100644 --- a/package.json +++ b/package.json @@ -104,6 +104,7 @@ "jasmine": "^3.2.0", "jasmine-enzyme": "^6.1.2", "jsdom": "^11.12.0", + "lost-pixel": "^3.18.2", "node-sass": "^4.9.3", "nodemon": "^1.18.4", "sass-loader": "^7.1.0",