Skip to content

Commit

Permalink
Merge branch 'master' into ci/add_fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
azimjohn authored Apr 5, 2024
2 parents 6330efa + 38f60f3 commit e0fcc76
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly

- package-ecosystem: gomod
directory: /
schedule:
interval: weekly
allow:
- dependency-type: all
16 changes: 16 additions & 0 deletions .github/workflows/govuln.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Go Vulnerability Checker
on: [push, pull_request]
permissions: read-all
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: 1.21.9
- run: |
set -euo pipefail
go install golang.org/x/vuln/cmd/govulncheck@latest && govulncheck ./...
16 changes: 16 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Tests
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.21
- uses: actions/checkout@v4
- name: tests
run: |
make test
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
NAME ?= jprq
PKG ?= github.com/azimjohn/$(NAME)
GO_VERSION ?= 1.22.2
GOOS ?= linux
GOARCH ?= amd64
TEMP_DIR := $(shell mktemp -d)
GOFILES = $(shell find . -name \*.go)

.PHONY: fmt
Expand All @@ -11,3 +17,11 @@ fmt:
.PHONY: verify
verify:
golangci-lint run --config tools/.golangci.yaml ./...

.PHONY: test
test:
@echo Vetting
go vet ./...
@echo Testing
go test ./... -skip TestConfig_Load

4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/azimjohn/jprq

go 1.19
go 1.21

toolchain go1.21.9

require (
github.com/djherbis/buffer v1.2.0
Expand Down

0 comments on commit e0fcc76

Please sign in to comment.