generated from templates/go-generic
Dan Anglin
7d0336d3db
Add the metadata endpoint so that clients can get the server's authorization and token endpoints. Changes: - Add a config object to allow administrators to configure the binding address, binding port and domain name. - Add a target in the magefiles and a step in the CI workflow to run go vet. - Add the Dockerfile. - Replace the --address flag with the --config flag. - Add the metadata endpoint to the router to return a JSON document containing the URLs to the metadata and token endpoints.
52 lines
1.2 KiB
YAML
52 lines
1.2 KiB
YAML
---
|
|
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
|
|
jobs:
|
|
tests:
|
|
name: Tests
|
|
if: ${{ ! github.event.pull_request.draft }}
|
|
runs-on: docker
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: https://code.forgejo.org/actions/checkout@v4
|
|
- name: Run tests
|
|
uses: https://codeflow.dananglin.me.uk/actions/mage-ci@main
|
|
with:
|
|
target: test
|
|
env:
|
|
PROJECT_TEST_VERBOSE: "1"
|
|
PROJECT_TEST_COVER: "1"
|
|
- name: Run gosec
|
|
uses: https://codeflow.dananglin.me.uk/actions/mage-ci@main
|
|
with:
|
|
target: gosec
|
|
- name: Run go vet
|
|
uses: https://codeflow.dananglin.me.uk/actions/mage-ci@main
|
|
with:
|
|
target: govet
|
|
|
|
style:
|
|
name: Style
|
|
if: ${{ ! github.event.pull_request.draft }}
|
|
runs-on: docker
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: https://code.forgejo.org/actions/checkout@v4
|
|
- name: Check formatting
|
|
uses: https://codeflow.dananglin.me.uk/actions/mage-ci@main
|
|
with:
|
|
target: gofmt
|
|
env:
|
|
PROJECT_FAIL_ON_FORMATTING: 1
|
|
- name: Run staticcheck
|
|
uses: https://codeflow.dananglin.me.uk/actions/mage-ci@main
|
|
with:
|
|
target: staticcheck
|