-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (41 loc) · 1.3 KB
/
cd-dev-botnorrea-v2-telegram.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
name: cd-dev-botnorrea-v2-telegram
on:
push:
branches: [develop]
jobs:
unit-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["18.x"]
steps:
- uses: actions/checkout@v3
- name: Using Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install serverless framework
run: npm install -g serverless
- name: Install dependencies
run: npm i
- name: Run tests
run: npm run coverage
- name: Check coverage
uses: VeryGoodOpenSource/[email protected]
with:
path: "coverage/lcov.info"
min_coverage: 30
- name: Create JSON
id: create-json
uses: jsdaniell/[email protected]
with:
name: "dev.json"
json: ${{ secrets.CONFIG_FILE_DEV }}
dir: "config/"
- name: Setup credentials
run: serverless config credentials --provider aws --key ${{ secrets.KEY_ID }} --secret ${{ secrets.SECRET_ACCESS_KEY }} --profile ${{ secrets.PROFILE }}
- name: Deploy
run: npm run dev:deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}