diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml new file mode 100644 index 0000000..9e3e9ad --- /dev/null +++ b/.woodpecker/test.yaml @@ -0,0 +1,27 @@ +when: + - event: push + branch: main + +steps: + - name: test + # image: docker:cli # use 'docker:-cli' or similar in production + image: golang + environment: + DOCKER_HOST: 'tcp://docker:2376' + DOCKER_CERT_PATH: '/dind-certs/client' + DOCKER_TLS_VERIFY: '1' + volumes: + - /opt/woodpeckerci/dind-certs:/dind-certs + commands: + - go test ./... + +services: + - name: docker + image: docker:dind # use 'docker:-dind' or similar in production + privileged: true + environment: + DOCKER_TLS_CERTDIR: /dind-certs + volumes: + - /opt/woodpeckerci/dind-certs:/dind-certs + ports: + - 2376