Skip to content

Commit

Permalink
Merge pull request #147 from numary/feature/openapi-v3
Browse files Browse the repository at this point in the history
Use plain old swagger file (v3).
  • Loading branch information
flemzord authored Feb 1, 2022
2 parents 264e2f8 + d18d340 commit 4241d1a
Show file tree
Hide file tree
Showing 16 changed files with 747 additions and 1,352 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,6 @@ on:

name: Main
jobs:
docs:
name: 'Build Docs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.NUMARY_GITHUB_TOKEN }}
- run: |
wget https://github.com/swaggo/swag/releases/download/v1.7.4/swag_1.7.4_Linux_x86_64.tar.gz
tar -zxvf swag_1.7.4_Linux_x86_64.tar.gz
- run: ./swag init
- uses: actions/upload-artifact@v2
with:
name: docs-dist
path: ./docs/**
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[skip ci] Update docs"
file_pattern: docs/docs.go docs/*.go
build_control:
name: 'Build Control'
runs-on: ubuntu-latest
Expand All @@ -46,7 +27,6 @@ jobs:
name: 'Build'
needs:
- build_control
- docs
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -78,11 +58,6 @@ jobs:
with:
name: control-dist
path: cmd/control/
- name: fetch docs
uses: actions/download-artifact@v2
with:
name: docs-dist
path: docs/
- name: OSXCross for CGO Support
if: matrix.os == 'ubuntu-latest'
run: |
Expand Down
117 changes: 0 additions & 117 deletions .github/workflows/pr_open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@ on:
pull_request:
types: [assigned, opened, synchronize, reopened]
jobs:
docs:
name: 'Build Docs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
wget https://github.com/swaggo/swag/releases/download/v1.7.4/swag_1.7.4_Linux_x86_64.tar.gz
tar -zxvf swag_1.7.4_Linux_x86_64.tar.gz
- run: ./swag init
- uses: actions/upload-artifact@v2
with:
name: docs-dist
path: ./docs/**
build_control:
name: 'Build Control'
runs-on: ubuntu-latest
Expand All @@ -39,7 +26,6 @@ jobs:
runs-on: ubuntu-latest
needs:
- build_control
- docs
steps:
- uses: actions/setup-go@v2
with:
Expand Down Expand Up @@ -69,7 +55,6 @@ jobs:
runs-on: ubuntu-latest
needs:
- build_control
- docs
services:
postgres:
image: postgres:13-alpine
Expand Down Expand Up @@ -111,103 +96,6 @@ jobs:
NUMARY_STORAGE_POSTGRES_CONN_STRING: "postgresql://ledger:[email protected]/ledger"
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
# Bench_sqlite:
# name: 'Bench - SQLite'
# runs-on: ubuntu-latest
# needs:
# - build_control
# - docs
# steps:
# - uses: actions/setup-go@v2
# with:
# go-version: '1.16'
# - uses: actions/checkout@v2
# - uses: actions/cache@v2
# with:
# path: |
# ~/.cache/go-build
# ~/go/pkg/mod
# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-go-
# - name: get deps
# run: go mod download
# - name: fetch numary control
# uses: actions/download-artifact@v2
# with:
# name: control-dist
# path: cmd/control/
# - name: run benchs
# run: go test -bench=Benchmark -run=^a ./... | tee output.txt
# - name: Store benchmark result
# uses: benchmark-action/github-action-benchmark@v1
# with:
# name: Leger Bench for SQLite
# tool: 'go'
# output-file-path: output.txt
# fail-on-alert: true
# github-token: ${{ secrets.GITHUB_TOKEN }}
# comment-on-alert: true
# benchmark-data-dir-path: dev/bench-sqlite
# auto-push: false
# comment-always: true
# Bench_postgres:
# name: 'Bench - PostgreSQL'
# runs-on: ubuntu-latest
# needs:
# - build_control
# - docs
# services:
# postgres:
# image: postgres:13-alpine
# env:
# POSTGRES_USER: ledger
# POSTGRES_PASSWORD: ledger
# POSTGRES_DB: ledger
# ports:
# - 5432:5432
# options: >-
# --health-cmd pg_isready
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
# steps:
# - uses: actions/setup-go@v2
# with:
# go-version: '1.16'
# - uses: actions/checkout@v2
# - uses: actions/cache@v2
# with:
# path: |
# ~/.cache/go-build
# ~/go/pkg/mod
# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-go-
# - name: get deps
# run: go mod download
# - name: fetch numary control
# uses: actions/download-artifact@v2
# with:
# name: control-dist
# path: cmd/control/
# - name: run tests
# run: go test -bench=Benchmark -run=^a ./... | tee output.txt
# env:
# NUMARY_STORAGE_DRIVER: "postgres"
# NUMARY_STORAGE_POSTGRES_CONN_STRING: "postgresql://ledger:[email protected]/ledger"
# - name: Store benchmark result
# uses: benchmark-action/github-action-benchmark@v1
# with:
# name: Leger Bench for PostgreSQL
# tool: 'go'
# output-file-path: output.txt
# fail-on-alert: true
# github-token: ${{ secrets.GITHUB_TOKEN }}
# comment-on-alert: true
# benchmark-data-dir-path: dev/bench-pgsql
# auto-push: false
# comment-always: true
Lint:
name: 'Lint'
runs-on: ubuntu-latest
Expand Down Expand Up @@ -266,11 +154,6 @@ jobs:
with:
name: control-dist
path: cmd/control/
- name: fetch docs
uses: actions/download-artifact@v2
with:
name: docs-dist
path: docs/
- name: OSXCross for CGO Support
if: matrix.os == 'ubuntu-latest'
run: |
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@ on:
permissions:
contents: write
jobs:
docs:
name: 'Build Docs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
wget https://github.com/swaggo/swag/releases/download/v1.7.4/swag_1.7.4_Linux_x86_64.tar.gz
tar -zxvf swag_1.7.4_Linux_x86_64.tar.gz
- run: ./swag init
- uses: actions/upload-artifact@v2
with:
name: docs-dist
path: ./docs/**
build_control:
name: 'Build Control'
runs-on: ubuntu-latest
Expand All @@ -40,7 +27,6 @@ jobs:
name: 'Build Binary'
needs:
- build_control
- docs
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -68,11 +54,6 @@ jobs:
with:
name: control-dist
path: cmd/control/
- name: fetch docs
uses: actions/download-artifact@v2
with:
name: docs-dist
path: docs/
- name: OSXCross for CGO Support
if: matrix.os == 'ubuntu-latest'
run: |
Expand All @@ -97,19 +78,13 @@ jobs:
runs-on: ubuntu-latest
needs:
- build_control
- docs
steps:
- uses: actions/checkout@v2
- name: fetch numary control
uses: actions/download-artifact@v2
with:
name: control-dist
path: cmd/control/
- name: fetch docs
uses: actions/download-artifact@v2
with:
name: docs-dist
path: docs/
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ coverage.out
cmd/control/*
!cmd/control/gitkeep
.DS_Store
docs/swagger.json
docs/swagger.yaml
.idea
vendor
Loading

0 comments on commit 4241d1a

Please sign in to comment.