-
-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (47 loc) · 1.28 KB
/
test.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
name: "TEST"
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: "⚙ Set up Node.js"
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: "✅ Checkout repository"
uses: actions/checkout@v2
build:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "💾 Restore packages from cache"
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: "📦 Install packages"
run: npm install
- name: "🔦 Lint"
run: npm run lint
- name: "🔨 Build"
run: npm run build
- name: "👨💻 Run Test"
run: npm run test
- name: "📊 Upload coverage report to Codecov"
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: "📊 SonarCloud Scan"
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}