Skip to content
Snippets Groups Projects
Verified Commit b2c6ff20 authored by Loïs Poujade's avatar Loïs Poujade
Browse files

Add upstream tests to gitlab ci

- dont ignore package-lock (needed for npm ci)
- use puppeteer container
- use junit for proper gitlab tests reports integration
- chrome without sandbox to not require SYS_ADMIN docker cap (cf
  https://pptr.dev/guides/docker)
parent 5c56a86a
No related branches found
No related tags found
No related merge requests found
dist/ dist/
coverage/ coverage/
node_modules/ node_modules/
package-lock.json
*.log *.log
*.tgz *.tgz
upstream_tests:
image: ghcr.io/puppeteer/puppeteer:latest
before_script:
- npm ci
script:
- npm run test:ci
artifacts:
when: always
paths:
- junit.xml
reports:
junit: junit.xml
module.exports = { module.exports = {
launch: { launch: {
args: ['--no-sandbox', '--disable-setuid-sandbox'],
headless: process.env.HEADLESS !== 'false', headless: process.env.HEADLESS !== 'false',
}, },
server: [{ server: [{
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
"lint:containers": "node ./scripts/container-lint.js", "lint:containers": "node ./scripts/container-lint.js",
"lint:translations": "node ./scripts/i18n-lint.js", "lint:translations": "node ./scripts/i18n-lint.js",
"server": "node_modules/.bin/http-server --cors", "server": "node_modules/.bin/http-server --cors",
"test:ci": "jest -c jest.json --ci --reporters=jest-junit --watchAll=false",
"test": "npm run build && npm run lint && npm run size && jest -c jest.json", "test": "npm run build && npm run lint && npm run size && jest -c jest.json",
"test:debug": "node --inspect node_modules/.bin/jest -c jest.json --runInBand", "test:debug": "node --inspect node_modules/.bin/jest -c jest.json --runInBand",
"test:watch": "jest -c jest.json --watch", "test:watch": "jest -c jest.json --watch",
...@@ -114,9 +115,10 @@ ...@@ -114,9 +115,10 @@
"http-server": "^14.1.0", "http-server": "^14.1.0",
"jest": "^27.5.1", "jest": "^27.5.1",
"jest-fetch-mock": "^3.0.0", "jest-fetch-mock": "^3.0.0",
"jest-junit": "^15.0.0",
"jest-puppeteer": "^6.1.0", "jest-puppeteer": "^6.1.0",
"jsdom": "^19.0.0", "jsdom": "^19.0.0",
"puppeteer": "^13.5.1", "puppeteer": "^13.7.0",
"react": "^16.8.6", "react": "^16.8.6",
"react-dom": "^16.8.6", "react-dom": "^16.8.6",
"react-refresh": "^0.11.0", "react-refresh": "^0.11.0",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment