-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (35 loc) · 1.03 KB
/
Copy pathbuild-test.yml
File metadata and controls
44 lines (35 loc) · 1.03 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
name: Run tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Start up LocalStack
env:
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
run: |
docker pull localstack/localstack-pro &
# install CLI tools
pip install --pre localstack localstack-ext awscli-local[ver1]
# start LocalStack
DEBUG=1 localstack start -d
localstack wait
- name: Run simple test
env:
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
run: |
set -e
# deploy test resources
(cd 00-hello-world; ./deploy.sh)
# run assertion
curl http://testwebsite.s3-website.localhost.localstack.cloud:4566 | grep 'You are running LocalStack'
- name: Print LocalStack logs
run: |
localstack logs
localstack stop