-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (52 loc) · 1.66 KB
/
node.js.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
60
61
62
63
64
65
66
67
68
name: Build & Upload
on:
push:
pull_request:
branches:
- master
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Checks & Build Test
runs-on: ubuntu-latest
steps:
- name: Repository checkout
uses: actions/checkout@v3
- name: Node.js setup
uses: actions/setup-node@v3
with:
node-version: '16'
- name: 📦 Install dependencies
run: yarn install
- name: Karma Test
run: yarn test
- name: 💨 Lint check
run: yarn lint
- name: 💅 Prettier check
run: yarn prettier:check
- name: 🏗️ Build app
run: yarn build --prod
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
deploy:
name: OneSky Upload
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: build
steps:
- name: Repository checkout
uses: actions/checkout@v3
- name: Node.js setup
uses: actions/setup-node@v3
with:
node-version: '16'
- name: 📦 Install dependencies
run: yarn install
- name: Upload to OneSky
run: yarn onesky:upload
env:
ONESKY_API_KEY: ${{ secrets.ONESKY_API_KEY }}
ONESKY_SECRET_KEY: ${{ secrets.ONESKY_SECRET_KEY }}