Skip to content

V2

V2 #139

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: 🧪 Tests
on:
workflow_dispatch: {}
push:
branches: [master, main]
paths-ignore: ['**.md']
tags-ignore: ['**']
pull_request:
paths-ignore: ['**.md']
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
git-leaks:
name: 🔐 Check for GitLeaks
runs-on: ubuntu-latest
steps:
- {uses: actions/checkout@v4, with: {fetch-depth: 0}}
- uses: gacts/gitleaks@v1
dns-control:
name: 🌐 DNSControl check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gacts/install-dnscontrol@v1
- run: dnscontrol check
working-directory: dns
lint-and-test-app:
name: 🧪 Test and lint app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- {uses: actions/setup-go@v5, with: {go-version-file: ./app/go.mod, cache-dependency-path: ./app/go.sum}}
- run: GOBIN=/bin go install "github.com/oapi-codegen/oapi-codegen/v2/cmd/[email protected]"
- run: go generate ./...
working-directory: ./app
- uses: golangci/golangci-lint-action@v6
with: {working-directory: ./app}
- run: go test -race -covermode=atomic ./...
working-directory: ./app
lint-mkcert:
name: 🧪 Lint mkcert
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- {uses: actions/setup-go@v5, with: {go-version-file: ./mkcert/go.mod, cache-dependency-path: ./mkcert/go.sum}}
- uses: golangci/golangci-lint-action@v6
with: {working-directory: ./mkcert}
build-docker-image:
name: 🏗️ Build the docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/build-push-action@v4
with:
context: ./app
file: ./app/Dockerfile
push: false
tags: app:local