-
Notifications
You must be signed in to change notification settings - Fork 11
62 lines (50 loc) · 2.04 KB
/
build+test.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
60
61
62
name: build+test
on: [push,pull_request]
jobs:
quanta-ci-job:
runs-on: ubuntu-latest
steps:
- name: Start LocalStack
env:
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
run: |
pip install localstack awscli-local[ver1] # install LocalStack cli and awslocal
docker pull localstack/localstack # Make sure to pull the latest version of the image
localstack start -d # Start LocalStack in the background
echo "Waiting for LocalStack startup..." # Wait 30 seconds for the LocalStack container
localstack wait -t 30 # to become ready before timing out
echo "Startup complete"
- name: Start consul
run: |
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install consul
consul agent -dev &
# docker pull consul
# -d
# docker run -p 8500:8500 -p 8600:8600/udp -p 4000:4000 -p 4001:4001 -p 4002:4002 --name=badger consul agent -dev -client="0.0.0.0"
echo "consul Startup complete"
- name: Run some Tests against LocalStack
run: |
awslocal s3 mb s3://test
awslocal s3 ls
echo "Test Execution complete!"
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21
- name: Build
run: |
ls -lah
go build -v ./...
- name: Test
run: |
ls -lah
# go test -v ./...
./test/run-go-tests.sh
- name: Test-Integration
run: |
ls -lah
# go test -v ./...
./test/run-go-integration-tests.sh