Skip to content

Commit

Permalink
Chore: move integrations tests to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
till committed Apr 3, 2021
1 parent e98dfd5 commit 6532966
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,30 @@ jobs:
with:
name: dnsbl_exporter
path: dist/dnsbl_exporter_linux_amd64

integration:
runs-on: ubuntu-latest
needs:
- snapshot
services:
unbound:
image: klutchell/unbound:latest
ports:
- 5053:5053
- 5053:5053/udp
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: dnsbl_exporter
- name: Allow running exporter
run: chmod +x ./dnsbl-exporter
- name: Start dnsbl_exporter
run: ./dnsbl-exporter --config.dns-resolver=unbound:5053 &
working-directory: ./dnsbl_exporter
- name: Test "/" exists
run: curl -I http://127.0.0.1:9211/
- name: Test "/metrics" exists
run: curl -I http://127.0.0.1:9211/metrics
- name: Test "/metrics" with targets
run: curl -i http://127.0.0.1:9211/metrics
5 changes: 1 addition & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
---
project_name: dnsbl_exporter

before:
hooks:
# you may remove this if you don't use vgo
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
builds:
- main: ./dnsbl_exporter.go
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ $ sudo unbound -d -vvvv

(This is for myself, since I tend to forget things.)

1. Create a release on Github
1. Assemble changelog based on PR merges, etc.
1. Tag must be `v1.0.0` (semantic versioning, prefixed by `v`)
1. CircleCI will pick it up and build the binaries
1. `git tag -a x.y.z`
1. `git push --tags`
1. GitHub Actions/GoReleaser will build a pretty release

0 comments on commit 6532966

Please sign in to comment.