Skip to content

Commit 45096c2

Browse files
authored
Merge pull request #158 from serverless-operations/allow-ci
Allow to read secret params from other PR
2 parents 00b97bc + bb6f018 commit 45096c2

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed

.github/workflows/pull_request.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: PULL REQUEST
2+
on:
3+
pull_request_target:
4+
types: [labeled]
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
if: contains(github.event.pull_request.labels.*.name, 'ok to test')
10+
timeout-minutes: 45
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/[email protected]
14+
with:
15+
node-version: 14
16+
17+
- name: Cache dependencies
18+
uses: actions/cache@v2
19+
with:
20+
path: ~/.npm
21+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
22+
restore-keys: |
23+
${{ runner.os }}-node-
24+
25+
- run: npm install
26+
- run: npm run lint
27+
- run: npm run test -- --coverageDirectory coverage/unit_tests
28+
- run: npm run integration-test -- --coverageDirectory coverage/integration_tests
29+
env:
30+
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
31+
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
32+
33+
- uses: actions/upload-artifact@v2
34+
with:
35+
name: code-coverage-report
36+
path: coverage

.github/workflows/config.yml renamed to .github/workflows/push.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
name: CI
2-
3-
on: [ push, pull_request ]
1+
name: ci
2+
on: [ push ]
43

54
jobs:
65
test:
@@ -19,7 +18,6 @@ jobs:
1918
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2019
restore-keys: |
2120
${{ runner.os }}-node-
22-
2321
- run: npm install
2422
- run: npm run lint
2523
- run: npm run test -- --coverageDirectory coverage/unit_tests

0 commit comments

Comments
 (0)