Skip to content

CI

CI #67

Workflow file for this run

name: CI
# Controls when the action will run.
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
pull_request:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v3
# Install Chrome Browser
- name: Setup Chrome
# You may pin to the exact commit or the version.
# uses: browser-actions/setup-chrome@4fa655aad48f56911cad16db9252399a9e592848
uses: browser-actions/setup-chrome@latest
with:
# The Chromium version to install and use.
chrome-version: stable
- name: Print chrome version
run: chrome --version
# Install NodeJS
- name: Setup Node.js environment
uses: actions/[email protected]
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# Runs npm install
- name: Install dependencies
run: npm install
- name: Lint files
run: npm run lint
- name: Build lib
run: npm run build:lib
- name: Run tests
run: npm run test -- --watch false --browsers ChromeHeadless
- name: Run e2e tests
run: npm run e2e -- --protractor-config='e2e/protractor.ci.conf.js'