-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (50 loc) · 1.88 KB
/
nodejs.yml
File metadata and controls
63 lines (50 loc) · 1.88 KB
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build + Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 15.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET }}
AWS_KEY: ${{ secrets.AWS_KEY }}
AWS_SECRET: ${{ secrets.AWS_SECRET }}
AWS_SDK_LOAD_CONFIG: ${{ secrets.AWS_SDK_LOAD_CONFIG }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
JWT_SECRET_ID: ${{ secrets.JWT_SECRET_ID }}
TABLE_NAME: ${{ secrets.TABLE_NAME }}
RUNNING_CI: "true"
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Clean Install
run: npm ci
- name: Install Cloud Deps
run: make cloud-install
- name: Env Check
run: make viewEnv
- name: Setup AWS Files [config + credentials]
run: |
mkdir -p /home/runner/.aws
touch /home/runner/.aws/credentials
touch /home/runner/.aws/config
echo '[default]\naws_access_key_id=${{ env.AWS_KEY }}\naws_secret_access_key=${{ env.AWS_SECRET }}' > /home/runner/.aws/credentials
echo '[default]\nregion=us-west-2\noutput=table' > /home/runner/.aws/config
- name: Read Creds File
run: cat /home/runner/.aws/credentials
- name: Build
run: make build
- name: Test
run: make test