Skip to content

build(deps-dev): bump cypress from 9.1.1 to 12.17.2 #901

build(deps-dev): bump cypress from 9.1.1 to 12.17.2

build(deps-dev): bump cypress from 9.1.1 to 12.17.2 #901

Workflow file for this run

name: CI for Ambianic UI
on:
# Trigger the workflow on push and pull requests
push:
# branches:
# - master
pull_request:
# branches:
# - master
jobs:
build:
runs-on: ubuntu-latest
# Skip CI if the commit message includes the string '[skip ci]'
if: "! contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
node-version: [lts/*]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install npm
run: |
npm version
npm ci
env:
CI: true
- name: Test Suite
uses: cypress-io/github-action@v2
with:
start: npm run serve
record: false # cypress.io free recording limit exceeded
wait-on: 'http://localhost:8080'
command: npm test
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Cypress test recorded videos for debugging
uses: actions/upload-artifact@v2
if: always()
with:
name: cypress-videos
path: cypress/videos
- name: Upload Cypress test recorded screenshots for debugging
uses: actions/upload-artifact@v2
if: always()
with:
name: cypress-screenshots
path: cypress/screenshots
- name: Code Coverage Report
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
root_dir: ./coverage/
# fail_ci_if_error: true # optional (default = false)
path_to_write_report: ./coverage/codecov_report.txt
verbose: true
- name: List coverage report files
run: |
ls -alR ./coverage
ls -al ./
- name: Upload test coverage report
uses: actions/upload-artifact@v2
with:
name: test-coverage
path: ./coverage
- name: Check if coverage meets minimum threshold
run:
npx nyc check-coverage --lines 81 --functions 76 --branches 66
- name: Build PWA distribution for production
run: |
npm run build --if-present
env:
CI: true
- name: Run Lighthouse PWA check against local production build
uses: treosh/lighthouse-ci-action@v8
with:
# no urls needed, since it uses local folder to scan .html files
# budgetPath: '.github/lighthouse/budget.json' # performance budgets
configPath: '.github/lighthouse/lighthouserc-static-dist-dir.yml'
uploadArtifacts: true # save results as an action artifacts
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
- name: Semantic Release Dry Run
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
@semantic-release/exec
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
@semantic-release/github
@semantic-release/npm
dry_run: true
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Semantic release & npm publish
# Runs only on the upstream ambianic master branch.
if: github.repository_owner == 'ambianic' && github.event_name == 'push' && ${{ github.ref == 'refs/heads/master' }}
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
@semantic-release/exec
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
@semantic-release/github
@semantic-release/npm
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}