-
Notifications
You must be signed in to change notification settings - Fork 28
126 lines (113 loc) · 3.53 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: npm test
on:
push:
branches:
- master
- main
# temporary disable until build workflow is configured properly
# branches-ignore:
# - '**'
paths:
#- 'dist/**'
- '**'
jobs:
test:
#if: false # always skip job
runs-on: ubuntu-latest
# services:
# dynamodb-server:
# image: awspilotdev/dynamodb-ui
# # env:
# # k: v
# ports:
# - 8000
strategy:
max-parallel: 4
matrix:
node-version:
#- 8.x
- 10.x
- 12.x
- 14.x
include:
# - node-version: 8.x
# region: "us-east-1"
- node-version: 10.x
region: "us-east-2"
- node-version: 12.x
region: "us-west-1"
- node-version: 14.x
region: "us-west-2"
# can not use secrets here
# secret_access_key: ${{ secrets.KEYSECRET_AKIAWS5577QLD5TL6AZN }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
# peer dependency
- run: npm install aws-sdk
#- run: npm run build --if-present
-
shell: bash
run: CI=true npm test
env:
AWS_ACCESS_KEY_ID: AKIAWS5577QLD5TL6AZN
AWS_SECRET_ACCESS_KEY: ${{ secrets.KEYSECRET_AKIAWS5577QLD5TL6AZN }}
AWS_REGION: ${{ matrix.region }}
CI: true
tag:
name: Tag
needs: test
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- uses: Klemensas/action-autotag@stable
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: "v"
#tag_suffix: " (beta)"
#tag_message: "Custom message goes here."
build:
needs: tag
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
node-version:
- 12.x
include:
- node-version: 12.x
region: "us-east-1"
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
# peer dependency
- run: npm install aws-sdk
#- run: npm run build --if-present
-
shell: bash
run: npm run build:browser
-
shell: bash
run: git status
env:
AWS_ACCESS_KEY_ID: AKIAWS5577QLD5TL6AZN
AWS_SECRET_ACCESS_KEY: ${{ secrets.KEYSECRET_AKIAWS5577QLD5TL6AZN }}
AWS_REGION: ${{ matrix.region }}
-
name: Commit dynamodb.js
run: |
git config --global user.name 'Adrian Praja'
git config --global user.email '[email protected]'
git commit -m "Browser Dist" dist/dynamodbjs.js dist/dynamodbjs.min.js || echo "Commit failed"
git push
env:
GIT_COMMITTED_AT: ${{ github.committed_at }}