-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.cirrus.yml
More file actions
54 lines (53 loc) · 2.06 KB
/
.cirrus.yml
File metadata and controls
54 lines (53 loc) · 2.06 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
45
46
47
48
49
50
51
52
53
54
env:
HOME: /root
# GOPATH is per-user. Here we run as root, so we put it in the root home directory.
GOPATH: ${HOME}/go
PATH: /usr/local/go/bin:${GOPATH}/bin:${PATH}
#
GO_PKG: go1.24.5.linux-amd64.tar.gz
TASKFILE_VERSION: v3.44.0
task:
# https://cirrus-ci.org/guide/custom-vms/
# Cirrus CI uses Google Cloud Platform for running all instances, except macos_instance.
# Things like Docker Builder and freebsd_instance are syntactic sugar for launching
# Compute Engine instances from a particular set of images.
# With compute_engine_instance it is possible to use any publicly available image for
# running your Cirrus tasks in.
#
# List all the public images of a given "project":
# gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images
#
compute_engine_instance:
image_project: cirrus-images # Name of the Cirrus CI public GCP project.
image: family/docker-kvm
platform: linux
# architecture: arm64
architecture: amd64
cpu: 4
memory: 16G
#nested_virtualization: true
modules_cache:
fingerprint_script: cat go.sum
folder: $GOPATH/pkg/mod
install_go_script: |
curl --location --fail-with-body --no-progress-meter https://go.dev/dl/${GO_PKG} -o ${GO_PKG}
rm -rf /usr/local/go && tar -C /usr/local -xzf ${GO_PKG}
get_go_deps_script: go get ./...
build_script: go build -v ./...
test_script: |
export FLORIST_MANUAL_TEST=ssh
#env | sort
# YEAH Enable Florist destructive tests!
mkdir -p /opt/florist/disposable
go install gotest.tools/gotestsum@latest
curl --location --fail-with-body --no-progress-meter https://github.com/go-task/task/releases/download/${TASKFILE_VERSION}/task_linux_amd64.tar.gz -o task_linux_amd64.tar.gz
tar xzf task_linux_amd64.tar.gz
./task test
lint_script: |
go install honnef.co/go/tools/cmd/staticcheck@latest
go vet ./...
staticcheck ./...
# Leave this step at the end of the task.
check_coverage_script: |
# The passed COVERAGE value is the one from destructive tests.
./task check-coverage COVERAGE='34.1%'