summaryrefslogtreecommitdiff
path: root/.drone.yml
diff options
context:
space:
mode:
authorElizabeth <elizabeth@simponic.xyz>2024-04-02 16:32:03 -0600
committerElizabeth <elizabeth@simponic.xyz>2024-04-02 16:32:03 -0600
commit07c272b8098b6cefa17280f65b4079e99a18a6c2 (patch)
treeb897943c857257604c4078516d3b846bfa6fa175 /.drone.yml
parentbcdcc508ef4a0ae646937c91d0994a90bde719e1 (diff)
downloadhatecomputers.club-07c272b8098b6cefa17280f65b4079e99a18a6c2.tar.gz
hatecomputers.club-07c272b8098b6cefa17280f65b4079e99a18a6c2.zip
add test step to ci
Diffstat (limited to '.drone.yml')
-rw-r--r--.drone.yml21
1 files changed, 16 insertions, 5 deletions
diff --git a/.drone.yml b/.drone.yml
index 8f459a1..38ed21d 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -1,9 +1,15 @@
---
kind: pipeline
type: docker
-name: build, publish docker image, deploy
+name: deployment
steps:
+ - name: run tests
+ image: golang
+ commands:
+ - go build
+ - go test -v ./...
+
- name: docker
image: plugins/docker
settings:
@@ -13,9 +19,10 @@ steps:
from_secret: gitea_packpub_password
registry: git.hatecomputers.club
repo: git.hatecomputers.club/hatecomputers/hatecomputers.club
- tags:
- - latest
- - main
+ when:
+ branch:
+ - main
+
- name: ssh
image: appleboy/drone-ssh
settings:
@@ -27,6 +34,10 @@ steps:
command_timeout: 2m
script:
- systemctl restart docker-compose@hatecomputers-club
+ when:
+ branch:
+ - main
+
trigger:
branch:
- - main
+ - main