-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.34 KB
/
tests.golang.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
#
# Generated by @zondax/cli
#
name: Tests
on:
push:
branches: [main, master, dev]
pull_request:
branches: [main, master, dev]
jobs:
tests:
runs-on: zondax-runners
services:
nats:
image: nats:latest
ports:
- "4222:4222"
- "5530:5530"
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y git build-essential wget curl
sudo apt-get install -y gettext-base
sudo curl -L "https://github.com/docker/compose/releases/download/v2.6.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Build
run: |
make build
- name: Start NATS Container
run: |
docker run -d -p 4222:4222 -p 5530:5530 -v $(pwd)/nats_config.yaml:/root/config.yaml nats:latest -js -m 5530 -c /root/config.yaml
sleep 10
# - name: Nats server
# run: |
# docker-compose run -T nats -js -m 5530 -c /root/config.yaml &
# sleep 10
- name: List Docker containers
run: docker ps
- name: Unit tests
run: make test || true