From 4a21568bcd6164e89389beec775bae3dff09f4db Mon Sep 17 00:00:00 2001 From: Marvin Steadfast Date: Tue, 1 Jun 2021 14:25:37 +0200 Subject: [PATCH] ci: try to run integration test in drone --- .drone.yml | 16 ++++++++++++++-- Makefile | 3 +++ integration_test.go | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index ea44dd8..d116ee6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -17,11 +17,23 @@ steps: - tags - name: test - image: golang:latest + image: golang:1.16 + privileged: true + volumes: + - name: dockersock + path: /var/run + environment: + RASPBIAN_IMAGE: /tmp/2021-05-07-raspios-buster-armhf-lite.img commands: - - make test + - apt update + - apt install -y multipath-tools unzip + - (cd /tmp; wget https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-05-28/2021-05-07-raspios-buster-armhf-lite.zip) + - (cd /tmp; unzip 2021-05-07-raspios-buster-armhf-lite.zip) + - make build-image + - make test-all depends_on: - tags + - lint - name: build image: goreleaser/goreleaser:v0.162.0 diff --git a/Makefile b/Makefile index 9c451a3..16b5f9b 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,9 @@ test: test-integration: release go test -v -tags=integration -timeout=120m +.PHONY: test-all +test-all: test test-integration + .PHONY: readme readme: goreadme -title revive > README.md diff --git a/integration_test.go b/integration_test.go index b5b3283..a962a07 100644 --- a/integration_test.go +++ b/integration_test.go @@ -19,7 +19,7 @@ import ( ) const ( - sdcard = "/home/marv/tmp/2021-03-04-raspios-buster-armhf-lite.img" + sdcard = "/tmp/2021-05-04-raspios-buster-armhf-lite.img" sshUser = "pi" sshPass = "raspberry" sshHost = "localhost"