-
Notifications
You must be signed in to change notification settings - Fork 42
57 lines (54 loc) · 2.01 KB
/
tests.yml
File metadata and controls
57 lines (54 loc) · 2.01 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
name: Tests
on:
workflow_dispatch:
pull_request:
branches:
- master
push:
branches:
- master
tags:
- '*'
jobs:
# unit tests
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: npm ci
- run: npm test
integration-test-latest:
# Run only on 'push' or 'pull_request within same repository (not from a fork)'
# since workflows triggered for PRs from a fork will not have access to GitHub secrets
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.base.repo.html_url == github.event.pull_request.head.repo.html_url) }}
needs: [unit-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- uses: ./
with:
secrets: '*secret*'
parse-json: true
integration-test-release:
# Run only on 'push' or 'pull_request within same repository (not from a fork)'
# since workflows triggered for PRs from a fork will not have access to GitHub secrets
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.base.repo.html_url == github.event.pull_request.head.repo.html_url) }}
needs: [unit-tests]
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- uses: abhilash1in/aws-secrets-manager-action@v2.1.0
with:
secrets: 'my_secret*'
parse-json: true