chore(deps-dev): bump @commitlint/config-conventional from 17.6.6 to 18.6.0 #452
Workflow file for this run
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 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
branches: [develop] | |
push: | |
branches: [stable, develop] | |
workflow_dispatch: | |
inputs: | |
reason: | |
description: Why was the workflow triggered manually? | |
required: true | |
type: string | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Run build and unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js and install NPM dependencies | |
uses: ./.github/actions/install-npm-deps | |
- name: Check code format | |
run: npm run format | |
- name: Lint | |
run: | | |
npm run lint | |
- name: Build | |
run: | | |
npm run build:lib | |
npm run build:demo -- --progress=false | |
npm run build:example -- --progress=false | |
- name: Test | |
run: | | |
npm run test:lib | |
npm run test:demo | |
npm run test:example | |
- name: Upload library build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts-ng-in-viewport | |
path: dist/ng-in-viewport | |
- name: Upload demo application build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts-demo | |
path: dist/demo | |
- name: Upload example application build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts-example | |
path: dist/example | |
- name: Upload code coverage report to Codecov | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage/ng-in-viewport/lcov.info | |
flags: unittests | |
e2e: | |
name: Run E2E tests | |
needs: build | |
strategy: | |
matrix: | |
project: ['demo', 'example'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js and install NPM dependencies | |
uses: ./.github/actions/install-npm-deps | |
- name: Download build artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: artifacts-${{ matrix.project }} | |
path: dist/${{ matrix.project }} | |
- name: Run cypress | |
uses: cypress-io/github-action@v5 | |
with: | |
project: projects/${{ matrix.project }}-e2e | |
browser: chrome | |
headless: true | |
- name: Upload failed screenshots | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: failed-e2e-${{ matrix.project }}-screenshots | |
path: projects/${{ matrix.project }}-e2e/artifacts/screenshots | |
- name: Upload failed videos | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: failed-e2e-${{ matrix.project }}-videos | |
path: projects/${{ matrix.project }}-e2e/artifacts/videos |