-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsparrow.yaml
49 lines (48 loc) · 1.16 KB
/
sparrow.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
44
45
46
47
48
49
image:
- melezhik/sparrow:alpine
- melezhik/sparrow:debian
- melezhik/sparrow:ubuntu
- melezhik/sparrow:archlinux
tasks:
-
name: go_test
language: Bash
code: |
set -e
echo "Run tests for OS: $os ..."
if test "$os" = "ubuntu" || test "$os" = "debian" || test "$os" = "arch" || test "$os" = "archlinux"; then
export PATH=/usr/local/go/bin:$PATH
fi
go version
cd source
go test -v
default: true
depends:
-
name: go_build
-
name: go_build
language: Bash
code: |
set -e
if test "$os" = "ubuntu" || test "$os" = "debian" || test "$os" = "arch" || test "$os" = "archlinux"; then
export PATH=/usr/local/go/bin:$PATH
fi
go version
cd source
go build -v
depends:
-
name: install-go
-
name: install-go
language: Bash
code: |
if test $os = "alpine"; then
sudo apk add go \
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
else
sudo rm -rf /usr/local/go
curl -sfL https://go.dev/dl/go1.19.3.linux-amd64.tar.gz -o ~/go1.19.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf ~/go*.linux-amd64.tar.gz
fi