Skip to content

chore: move repo from kaleidos-ventures to taigaio org #56

chore: move repo from kaleidos-ventures to taigaio org

chore: move repo from kaleidos-ventures to taigaio org #56

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request events
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
linters:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Set node version
strategy:
matrix:
node-version: [12.17.0]
# 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
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm ci
- name: pass linters
run: npm run lint
unit-test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Set node version
strategy:
matrix:
node-version: [12.17.0]
# 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
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm ci
- name: pass unit test
run: npm run test
e2e-test:
# The type of runner that the job will run on
#
# NOTE: we don't use ubuntu-latest because this (https://github.com/cypress-io/github-action#important)
# We are getting reports that Cypress has suddenly started crashing when running on ubuntu-latest OS.
# Seems, GH Actions have switched from 16.04 to 18.04 overnight, and are having a xvfb issue. Please
# work around this problem by using runs-on: ubuntu-16.04 image or upgrading to Cypress v3.8.3 where
# we explicitly set XVFB arguments.
runs-on: ubuntu-16.04
# Set node version
strategy:
matrix:
node-version: [12.17.0]
# 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
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm ci
- name: Cypress run
uses: cypress-io/github-action@v1
with:
start: npm start -- -c test
wait-on: 'http://localhost:4200'
wait-on-timeout: 200
# after the test run completes
# store videos and any screenshots
# NOTE: screenshots will be generated only if E2E test failed
# thus we store screenshots only on failures
# Alternative: create and commit an empty cypress/screenshots folder
# to always have something to upload
- uses: actions/upload-artifact@v1
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v1
if: always()
with:
name: cypress-videos
path: cypress/videos