Skip to content

Commit

Permalink
Merge pull request #74 from Luzilla/chore-update
Browse files Browse the repository at this point in the history
Chore: "luzilla" vs "Luzilla"
  • Loading branch information
till authored Mar 31, 2021
2 parents 391c174 + e32aeb1 commit 5b3c8b6
Show file tree
Hide file tree
Showing 8 changed files with 238 additions and 40 deletions.
15 changes: 2 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
# DRY
x_ref:
docker_golang: &docker_golang
image: circleci/golang:1.12
image: circleci/golang:1.16
docker_goreleaser: &docker_goreleaser
image: goreleaser/goreleaser
work_dir: &work_dir
Expand All @@ -12,23 +12,12 @@ x_ref:
workflows:
pr:
jobs:
- test
- build:
requires:
- test
- build
- integration:
requires:
- build

jobs:
test:
<<: *work_dir
docker:
- *docker_golang
steps:
- checkout
- run: go mod download
- run: go test ./...
build:
<<: *work_dir
docker:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: pr

on:
pull_request:

jobs:
test:
strategy:
matrix:
go-version: [1.14.x, 1.15.x, 1.16.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout
uses: actions/checkout@v2
- name: Test
run: go test ./...

snapshot:
runs-on: ubuntu-latest
needs:
- test
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist --snapshot
- name: Copy .ini files
run: cp targets.ini rbls.ini ./dist/dnsbl_exporter_linux_amd64
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: dnsbl_exporter
path: dist/dnsbl_exporter_linux_amd64
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dist
vendor
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
.PHONY: build
build:
goreleaser --snapshot --rm-dist

.PHONY: test
test:
docker run \
-it \
--rm \
-v $(CURDIR):/src/github.com/Luzilla/dnsbl_exporter \
-w /src/github.com/Luzilla/dnsbl_exporter \
golang:1.16 \
sh -c "go mod download && go test ./..."
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dnsbl-exporter

[![CircleCI](https://circleci.com/gh/Luzilla/dnsbl_exporter.svg?style=svg)](https://circleci.com/gh/Luzilla/dnsbl_exporter) [![Maintainability](https://api.codeclimate.com/v1/badges/31b95e6c679f60e30bea/maintainability)](https://codeclimate.com/github/Luzilla/dnsbl_exporter/maintainability)
[![CircleCI](https://circleci.com/gh/Luzilla/dnsbl_exporter.svg?style=svg)](https://circleci.com/gh/Luzilla/dnsbl_exporter) [![pr](https://github.com/Luzilla/dnsbl_exporter/actions/workflows/pr.yml/badge.svg)](https://github.com/Luzilla/dnsbl_exporter/actions/workflows/pr.yml) [![Maintainability](https://api.codeclimate.com/v1/badges/31b95e6c679f60e30bea/maintainability)](https://codeclimate.com/github/Luzilla/dnsbl_exporter/maintainability)

This is a server which checks the configured hosts against various DNSBL (sometimes refered to as RBLs).

Expand Down
4 changes: 2 additions & 2 deletions dnsbl_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"net/http"
"os"

"github.com/luzilla/dnsbl_exporter/collector"
"github.com/luzilla/dnsbl_exporter/config"
"github.com/Luzilla/dnsbl_exporter/collector"
"github.com/Luzilla/dnsbl_exporter/config"
"github.com/prometheus/client_golang/prometheus"
"github.com/urfave/cli"

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/luzilla/dnsbl_exporter
module github.com/Luzilla/dnsbl_exporter

go 1.12
go 1.16

require github.com/prometheus/client_golang v1.9.0

Expand Down
195 changes: 173 additions & 22 deletions go.sum

Large diffs are not rendered by default.

0 comments on commit 5b3c8b6

Please sign in to comment.