-
Notifications
You must be signed in to change notification settings - Fork 71
43 lines (42 loc) · 1.4 KB
/
pr-test.yaml
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
on: pull_request
name: Pull Request
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '~1.21' # The Go version to download (if necessary) and use.
- name: Start up dependencies
run: docker compose up -d rabbitmq kafka mosquitto-ssl mosquitto activemq redis pulsar
- name: Wait for dependencies to start up
uses: jakejarvis/wait-action@master
with:
time: '30s'
functional:
name: Run functional tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '~1.21' # The Go version to download (if necessary) and use.
- name: Start up dependencies
run: docker compose up -d
- name: Wait for dependencies to start up
uses: jakejarvis/wait-action@master
with:
time: '60s'
- name: Test
env:
AWS_REGION: us-west-2
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TEST_API_TOKEN: ${{ secrets.TEST_API_TOKEN }}
TEST_COLLECTION_TOKEN: ${{ secrets.TEST_COLLECTION_TOKEN }}
run: |
go run main.go server --auth-token "streamdal" &
sleep 5
go test --tags=functional