Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Goal of this PR

<!-- A brief description of the change being made with this pull request. -->

<!--
Fixes #
-->

## How did I test it?

<!-- A brief description the steps taken to test this pull request. -->
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: gomod
directory: "/"
schedule:
interval: weekly
groups:
all:
patterns:
- "*"
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
groups:
all:
patterns:
- "*"
open-pull-requests-limit: 10
108 changes: 108 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Go Test

on:
push:
branches:
- main
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ "1.23" ]
env:
GOLANGCI_LINT_VERSION: v1.61.0

steps:
- name: Install Go
if: success()
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v4

- name: Cache Go modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Run linter
uses: golangci/golangci-lint-action@v6
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}

- name: Run tests
run: go run gotest.tools/gotestsum@latest --junitfile tests.xml --format pkgname -- -cover -race ./...

- name: Test Summary
uses: test-summary/action@v2
with:
paths: "tests.xml"
if: always()

build:
runs-on: ubuntu-latest
strategy:
matrix:
os:
- darwin
- linux
- windows
arch:
- 386
- amd64
- arm
- arm64
- ppc64le
- s390x
include:
- os: linux
arch: arm
arm: 7
exclude:
- os: darwin
arch: 386
- os: darwin
arch: arm
- os: darwin
arch: ppc64le
- os: darwin
arch: s390x
- os: windows
arch: arm
- os: windows
arch: arm64
- os: windows
arch: ppc64le
- os: windows
arch: s390x
env:
GO_VERSION: "1.23"

steps:
- name: Install Go
if: success()
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Checkout code
uses: actions/checkout@v4

- name: Cache Go modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Build oapi-gen
run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} GOARM=${{ matrix.arm }} go build ./cmd/oapi-gen
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/oapi-gen
12 changes: 0 additions & 12 deletions .gitlab-ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Any struct with the directive `openapi:gen` will have a documentation function g
#### Install

```shell
$ go install gitlab.com/nitrado/b2b/go/openapi/cmd/oapi-gen@<version>
$ go install github.com/gamefabric/openapi/cmd/oapi-gen@<version>
```

A simple way to keep the generation up-to-date is to use Go's generation framework on each package that needs documentation functions.
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"log"
"net/http"

"github.com/gamefabric/openapi"
kin "github.com/getkin/kin-openapi/openapi3"
"github.com/go-chi/chi/v5"
"gitlab.com/nitrado/b2b/go/openapi"
)

func Example() {
Expand Down
2 changes: 1 addition & 1 deletion gen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"strconv"
"testing"

"github.com/gamefabric/openapi"
kin "github.com/getkin/kin-openapi/openapi3"
"github.com/go-chi/chi/v5"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gitlab.com/nitrado/b2b/go/openapi"
)

var update = flag.Bool("update", false, "update the golden files of this test")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module gitlab.com/nitrado/b2b/go/openapi
module github.com/gamefabric/openapi

go 1.23.0

Expand Down
19 changes: 0 additions & 19 deletions renovate.json

This file was deleted.