[NFT] Add V-Chip / Bump caminojs #1099
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
name: main-commit-checks | |
on: | |
push: | |
branches: [c4t, dev] | |
pull_request: | |
branches: [c4t, dev] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# The node version, you can put one or many versions in here to test with | |
node: [18] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
# This should be caching node modules, hashing the cache key with the yarn lock code and busting that when yarn lock changes | |
- name: cache modules | |
uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-1-${{ hashFiles('**/yarn.lock') }} | |
- run: sudo npm install -g yarn | |
- run: yarn install --network-timeout 1000000 | |
env: | |
CYPRESS_CACHE_FOLDER: ~/.cache/Cypress | |
- name: linting | |
run: yarn run lint | |
- name: prettier | |
run: yarn run format-check | |
- name: jest-run | |
run: yarn test | |
- name: cypress-run | |
uses: cypress-io/github-action@v2 | |
env: | |
USE_HTTP: true | |
with: | |
start: yarn serve --mode e2e | |
wait-on: 'http://localhost:5000/' | |
# wait for 3 minutes for the server to respond | |
wait-on-timeout: 180 | |
browser: chrome | |
headless: true | |
# These extract all artifacts out from the container to git so they can be previewed | |
- name: extract screenshots to git | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
# Test run video was always captured, so this action uses "always()" condition | |
- name: extract videos to git | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: cypress-videos | |
path: cypress/videos |