forked from project-koku/koku-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (57 loc) · 1.94 KB
/
pull_request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Run this workflow for PRs only. Travis is required to push via insights-frontend-builder-common scripts
name: Pull request
on:
pull_request:
branches: [ master, ci-stable, prod-beta, prod-stable, qa-beta, qa-stable ]
env:
BRANCH: ${{ github.base_ref }}
jobs:
build:
name: koku-ui build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set Node.js packages yarn cache directory
id: yarn-cache-dir
run: echo ::set-output name=CACHE_DIR::$(yarn cache dir)
- name: Node.js yarn cache
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir.outputs.CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn
- name: Node.js modules cache
uses: actions/cache@v2
id: modules-cache
with:
path: ${{ github.workspace }}/node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-modules
- name: Install Node.js packages
if: ${{ steps.modules-cache.outputs.cache-hit != 'true' }}
run: yarn --frozen-lockfile
- name: Check manifest
if: ${{ success() }}
run: ${{ github.workspace }}/.travis/check_manifest.sh
- name: Lint
if: ${{ success() }}
run: yarn lint
- name: Test
if: ${{ success() }}
run: yarn test --coverage --maxWorkers=4
- name: Build
if: ${{ success() }}
run: yarn build
- name: Code coverage
if: ${{ success() }}
uses: codecov/codecov-action@v1