diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000000..1b6361f1b8 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,46 @@ +name: Build and Deploy Cozy-ui +on: pull_request +jobs: + # lint: + # runs-on: ubuntu-latest + # steps: + # - run: node --version + # - run: yarn lint + node: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 16 + # - run: yarn add puppeteer@"21.11.0" -DE --ignore-scripts + - name: Install packages + run: yarn install --frozen-lockfile + # - run: npx puppeteer browsers install chrome + # - run: cd node_modules/puppeteer/ && yarn exec node install.mjs + - name: Lint + run: yarn lint + - name: Generate Sprite and Palette + run: yarn makeSpriteAndPalette + - name: Build JS + run: yarn build + - name: Build CSS + run: yarn build:css:all + - name: Build docs + run: yarn build:doc:react && yarn build:doc:kss + - name: Tests without snapshots + run: yarn test:noSnapshots + - name: Tests snapshots + run: yarn test:snapshots + # - name: Bundlemon + # run: yarn bundlemon + - name: Argos - Prepare env + run: mkdir ./screenshots + - name: Argos - Create desktop screenshots + run: yarn screenshots --mode react --viewport desktop --screenshot-dir ./screenshots/reactDesktop + - name: Argos - Create mobile screenshots + run: yarn screenshots --mode react --viewport 300x600 --screenshot-dir ./screenshots/reactMobile + - name: Argos - Create kss screenshots + run: yarn screenshots --mode kss --screenshot-dir ./screenshots/kss + - name: Argos - Upload all screenshots + run: yarn argos:upload --parallel screenshots/reactDesktop/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $TRAVIS_BUILD_ID --ignore '' diff --git a/package.json b/package.json index cd7bb00450..48b5acd97b 100644 --- a/package.json +++ b/package.json @@ -127,7 +127,7 @@ "postcss-loader": "2.1.6", "pretty": "2.0.0", "prop-types": "15.7.2", - "puppeteer": "21.6.1", + "puppeteer-core": "21.11.0", "react": "16.12.0", "react-dom": "16.12.0", "react-hot-loader": "^4.3.11", @@ -185,7 +185,6 @@ "cozy-harvest-lib": "^6.7.3", "cozy-intent": ">=1.3.0", "cozy-sharing": ">=14.1.0", - "puppeteer": "^1.20.0", "react": "^16.8.6", "react-dom": "^16.8.6" }, diff --git a/yarn.lock b/yarn.lock index 26d14af9ec..0d369ee7d6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2288,10 +2288,10 @@ resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.4.4.tgz#11d5db19bd178936ec89cd84519c4de439574398" integrity sha512-1oO6+dN5kdIA3sKPZhRGJTfGVP4SWV6KqlMOwry4J3HfyD68sl/3KmG7DeYUzvN+RbhXDnv/D8vNNB8168tAMg== -"@puppeteer/browsers@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-1.9.0.tgz#dfd0aad0bdc039572f1b57648f189525d627b7ff" - integrity sha512-QwguOLy44YBGC8vuPP2nmpX4MUN2FzWbsnvZJtiCzecU3lHmVZkaC1tq6rToi9a200m8RzlVtDyxCS0UIDrxUg== +"@puppeteer/browsers@1.9.1": + version "1.9.1" + resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-1.9.1.tgz#384ee8b09786f0e8f62b1925e4c492424cb549ee" + integrity sha512-PuvK6xZzGhKPvlx3fpfdM2kYY3P/hB1URtK8wA7XUJ6prn6pp22zvJHu48th0SGcHL9SutbPHrFuQgfXTFobWA== dependencies: debug "4.3.4" extract-zip "2.0.1" @@ -5239,13 +5239,13 @@ chrome-trace-event@^1.0.2: dependencies: tslib "^1.9.0" -chromium-bidi@0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.5.1.tgz#390c1af350c4887824a33d82190de1cc5c5680fc" - integrity sha512-dcCqOgq9fHKExc2R4JZs/oKbOghWpUNFAJODS8WKRtLhp3avtIH5UDCBrutdqZdh3pARogH8y1ObXm87emwb3g== +chromium-bidi@0.5.8: + version "0.5.8" + resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.5.8.tgz#5053038425c062ed34b9bc973e84e79de0a5cef0" + integrity sha512-blqh+1cEQbHBKmok3rVJkBlBxt9beKBgOsxbFgs7UJcoVbbeZ+K7+6liAsjgpc8l1Xd55cQUy14fXZdGSb4zIw== dependencies: mitt "3.0.1" - urlpattern-polyfill "9.0.0" + urlpattern-polyfill "10.0.0" ci-info@^1.5.0: version "1.6.0" @@ -6021,16 +6021,6 @@ corser@^2.0.1: resolved "https://registry.yarnpkg.com/corser/-/corser-2.0.1.tgz#8eda252ecaab5840dcd975ceb90d9370c819ff87" integrity sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c= -cosmiconfig@8.3.6: - version "8.3.6" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.3.6.tgz#060a2b871d66dba6c8538ea1118ba1ac16f5fae3" - integrity sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA== - dependencies: - import-fresh "^3.3.0" - js-yaml "^4.1.0" - parse-json "^5.2.0" - path-type "^4.0.0" - cosmiconfig@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" @@ -7049,10 +7039,10 @@ detect-port-alt@1.1.6: address "^1.0.1" debug "^2.6.0" -devtools-protocol@0.0.1203626: - version "0.0.1203626" - resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1203626.tgz#4366a4c81a7e0d4fd6924e9182c67f1e5941e820" - integrity sha512-nEzHZteIUZfGCZtTiS1fRpC8UZmsfD1SiyPvaUNvS13dvKf666OAm8YTi0+Ca3n1nLEyu49Cy4+dPWpaHFJk9g== +devtools-protocol@0.0.1232444: + version "0.0.1232444" + resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1232444.tgz#406345a90a871ba852c530d73482275234936eed" + integrity sha512-pM27vqEfxSxRkTMnF+XCmxSEb6duO5R+t8A9DEEJgy4Wz2RVanje2mmj99B6A3zv2r/qGfYlOvYznUhuokizmg== dezalgo@^1.0.0: version "1.0.3" @@ -10304,7 +10294,7 @@ import-fresh@^2.0.0: caller-path "^2.0.0" resolve-from "^3.0.0" -import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1, import-fresh@^3.3.0: +import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -15068,16 +15058,6 @@ parse-json@^5.0.0: json-parse-better-errors "^1.0.1" lines-and-columns "^1.1.6" -parse-json@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - parse5-htmlparser2-tree-adapter@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" @@ -16375,26 +16355,17 @@ pupa@^3.1.0: dependencies: escape-goat "^4.0.0" -puppeteer-core@21.6.1: - version "21.6.1" - resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-21.6.1.tgz#10eccb4dc3167c8c26bc21122fabb45a9fda9ca7" - integrity sha512-0chaaK/RL9S1U3bsyR4fUeUfoj51vNnjWvXgG6DcsyMjwYNpLcAThv187i1rZCo7QhJP0wZN8plQkjNyrq2h+A== +puppeteer-core@21.11.0: + version "21.11.0" + resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-21.11.0.tgz#6c60ec350f1a3a2152179c68166da6edfce18a23" + integrity sha512-ArbnyA3U5SGHokEvkfWjW+O8hOxV1RSJxOgriX/3A4xZRqixt9ZFHD0yPgZQF05Qj0oAqi8H/7stDorjoHY90Q== dependencies: - "@puppeteer/browsers" "1.9.0" - chromium-bidi "0.5.1" + "@puppeteer/browsers" "1.9.1" + chromium-bidi "0.5.8" cross-fetch "4.0.0" debug "4.3.4" - devtools-protocol "0.0.1203626" - ws "8.15.1" - -puppeteer@21.6.1: - version "21.6.1" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-21.6.1.tgz#2ec0878906ff90b3a424f19e5eb006592abe25b6" - integrity sha512-O+pbc61oj8ln6m8EJKncrsQFmytgRyFYERtk190PeLbJn5JKpmmynn2p1PiFrlhCitAQXLJ0MOy7F0TeyCRqBg== - dependencies: - "@puppeteer/browsers" "1.9.0" - cosmiconfig "8.3.6" - puppeteer-core "21.6.1" + devtools-protocol "0.0.1232444" + ws "8.16.0" q-i@^2.0.1: version "2.0.1" @@ -20795,10 +20766,10 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" -urlpattern-polyfill@9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-9.0.0.tgz#bc7e386bb12fd7898b58d1509df21d3c29ab3460" - integrity sha512-WHN8KDQblxd32odxeIgo83rdVDE2bvdkb86it7bMhYZwWKJz0+O0RK/eZiHYnM+zgt/U7hAHOlCQGfjjvSkw2g== +urlpattern-polyfill@10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz#f0a03a97bfb03cdf33553e5e79a2aadd22cac8ec" + integrity sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg== use-callback-ref@^1.2.3: version "1.2.4" @@ -21465,10 +21436,10 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" -ws@8.15.1: - version "8.15.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.15.1.tgz#271ba33a45ca0cc477940f7f200cd7fba7ee1997" - integrity sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ== +ws@8.16.0: + version "8.16.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.16.0.tgz#d1cd774f36fbc07165066a60e40323eab6446fd4" + integrity sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ== ws@^6.2.1: version "6.2.1"