Add tests to drone

This commit is contained in:
IamTheFij 2020-08-19 13:12:17 -07:00
parent e83d5b6784
commit a5f9b0866f
2 changed files with 34 additions and 4 deletions

View File

@ -1,11 +1,41 @@
---
kind: pipeline kind: pipeline
name: test name: test
steps: steps:
- name: build - name: test
image: golang:1.12 image: golang:1.15
commands: commands:
- make build - make test
- name: check
image: python:3
commands:
- pip install docker-compose pre-commit
- wget -L -O /usr/bin/hadolint https://github.com/hadolint/hadolint/releases/download/v1.18.0/hadolint-Linux-x86_64
- chmod +x /usr/bin/hadolint
- make check
# - name: itest
# image: docker/compose:alpine-1.26.2
# environment:
# VERSION: ${DRONE_TAG:-${DRONE_COMMIT}}
# commands:
# - apk add make bash
# - make itest
- name: notify
image: drillster/drone-email
settings:
host:
from_secret: SMTP_HOST # pragma: whitelist secret
username:
from_secret: SMTP_USER # pragma: whitelist secret
password:
from_secret: SMTP_PASS # pragma: whitelist secret
from: drone@iamthefij.com
when:
status: [changed, failure]
--- ---
kind: pipeline kind: pipeline

View File

@ -18,4 +18,4 @@ repos:
rev: v2.0.0 rev: v2.0.0
hooks: hooks:
- id: docker-compose-check - id: docker-compose-check
- id: hadolint - id: hadolint-system