forked from awslabs/service-workbench-on-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (39 loc) · 1.11 KB
/
unit-test-code-analysis.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
#
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#
name: Unit Tests & Code Analysis
on:
pull_request:
branches:
- develop
- 'feat-*'
jobs:
static-code-analysis-and-unit-test:
name: Unit Tests & Code Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Cache Node.js dependencies
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-pnpm-
${{ runner.os }}-
- name: Install Node.js dependencies
run: |
npm install -g pnpm
pnpm recursive install --unsafe-perm --stream
- name: Run static code analysis & linting tests
run: |
./scripts/run-static-code-analysis.sh --stream
- name: Run unit tests
run: |
./scripts/run-unit-tests.sh --stream