build: update node.js.yml #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
name: Node.js CI | |
on: | |
push: | |
branches: [ "develop" ] | |
pull_request: | |
branches: [ "develop" ] | |
jobs: | |
install: | |
runs-on: ubuntu-latest | |
container: | |
image: cypress/browsers:node-20.12.0-chrome-123.0.6312.86-1-ff-124.0.2-edge-123.0.2420.65-1 | |
options: --user 1001 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cypress install | |
uses: cypress-io/github-action@v6 | |
with: | |
runTests: false | |
# report machine parameters | |
- run: node --version | |
- run: node -p 'os.cpus()' | |
- run: npm run build | |
- name: Save build folder | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
if-no-files-found: error | |
path: build | |
ui-chrome-tests: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
container: | |
image: cypress/browsers:node-20.12.0-chrome-123.0.6312.86-1-ff-124.0.2-edge-123.0.2420.65-1 | |
options: --user 1001 | |
needs: install | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download the build folders | |
uses: actions/download-artifact@v4 | |
with: | |
name: build | |
path: build | |
- name: Node info | |
run: node -v | |
- name: "UI Tests - Chrome" | |
uses: cypress-io/github-action@v6 | |
- run: ncp dist/ examples/dist/ | |
- run: http-server examples -p 2222 -c-1 --silent --cors | |
- run: http-server tests/mocks -p 8181 -c-1 --silent --cors | |
- run: cypress:headless | |