This repository has been archived by the owner on Feb 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
59 lines (50 loc) · 1.48 KB
/
polly.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
name: Polly Recordings
on:
push:
branches-ignore:
- master
paths:
- '**.ts'
- '**.har'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12.x'
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: install
run: npm ci
- name: test
run: npm t -- test/integration/
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
MWS_AUTH_TOKEN: ${{ secrets.MWS_AUTH_TOKEN }}
SECRET_KEY: ${{ secrets.SECRET }}
SELLER_ID: ${{ secrets.SELLER_ID }}
POLLY_RECORD_IF_MISSING: "true"
- name: Commit files
if: ${{ always() }}
run: |
git config --local user.email "scale-bot@scaleleap.com"
git config --local user.name "Scale Bot"
git add -A test/integration/__recordings__
git diff-index --quiet HEAD || git commit -m "test: adds Polly recordings"
- name: Push changes
if: ${{ always() }}
uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref }}
github_token: ${{ secrets.GITHUB_TOKEN }}