Skip to content

Commit

Permalink
Add support for filtering units by allegiance (#33)
Browse files Browse the repository at this point in the history
* Add allegiance field to Unit GraphQL schema and tags to openapi spec

* fix: print directory and list files in setup section

* fix: refer to current path's package

* fix: removing the auto generation - it is problematic

---------

Co-authored-by: brittonhayes <[email protected]>
  • Loading branch information
brittonhayes and brittonhayes authored Nov 29, 2023
1 parent 7f9b450 commit 7110637
Show file tree
Hide file tree
Showing 13 changed files with 378 additions and 149 deletions.
58 changes: 29 additions & 29 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,37 @@ jobs:
- name: Coverage
run: go tool cover -func cover.out

generate:
needs: ci
permissions:
contents: write
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.20.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
# generate:
# needs: ci
# permissions:
# contents: write
# runs-on: ubuntu-latest
# strategy:
# matrix:
# go-version: [1.20.x]
# os: [ubuntu-latest]
# steps:
# - uses: actions/checkout@v3
# with:
# repository: ${{ github.event.pull_request.head.repo.full_name }}
# ref: ${{ github.event.pull_request.head.ref }}

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
# - name: Set up Go ${{ matrix.go-version }}
# uses: actions/setup-go@v3
# with:
# go-version: ${{ matrix.go-version }}

- uses: actions/setup-node@v3
with:
node-version: 18
# - uses: actions/setup-node@v3
# with:
# node-version: 18

- name: Setup tools
run: |
go install github.com/discord-gophers/goapi-gen@latest
go install go.uber.org/mock/mockgen@latest
# - name: Setup tools
# run: |
# go install github.com/discord-gophers/goapi-gen@latest
# go install go.uber.org/mock/mockgen@latest

- name: Generate
run: |
go generate ./...
# - name: Generate
# run: |
# go generate ./...

- uses: EndBug/add-and-commit@v9
# - uses: EndBug/add-and-commit@v9
2 changes: 1 addition & 1 deletion aos.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package aos provides the Repository interface for the AoS REST API and services
//
//go:generate mockgen -destination=internal/mocks/mock_repository.go -package=mocks github.com/brittonhayes/aos Repository
//go:generate mockgen -destination=internal/mocks/mock_repository.go -package=mocks . Repository
//go:generate goapi-gen -generate types,server,spec -package api --out api/api.gen.go ./api/openapi.yaml
//go:generate go run github.com/99designs/gqlgen generate
//go:generate npx @redocly/cli build-docs api/openapi.yaml -o web/src/docs.html
Expand Down
72 changes: 43 additions & 29 deletions api/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7110637

Please sign in to comment.