Skip to content

Commit

Permalink
Create ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Krismix1 authored May 22, 2020
1 parent 10bb754 commit fdcdd4a
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Lint, format and test checks

on:
push:
branches: ['**']
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Cloning the repo
uses: actions/checkout@v2
- name: Set up Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
# https://github.com/actions/cache/blob/master/examples.md#node---yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Yarn cache
uses: actions/cache@v1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install project dependencies
run: yarn install
- name: Check code format
run: yarn format:check
- name: Lint Angular code
run: yarn lint:angular
- name: Lint SCSS code
run: yarn lint:sass
- name: Run unit tests
run: yarn test:ci

0 comments on commit fdcdd4a

Please sign in to comment.