Skip to content

Commit

Permalink
Merge branch 'main' into feature/num-289-handle-ledger-status-code-re…
Browse files Browse the repository at this point in the history
…move-500
  • Loading branch information
flemzord authored Jan 19, 2022
2 parents 068e9b0 + d79996c commit 61d2ec5
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 98 deletions.
194 changes: 97 additions & 97 deletions .github/workflows/pr_open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,103 +111,103 @@ jobs:
NUMARY_STORAGE_POSTGRES_CONN_STRING: "postgresql://ledger:ledger@127.0.0.1/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:ledger@127.0.0.1/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
# 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:ledger@127.0.0.1/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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/jackc/pgconn v1.10.1
github.com/jackc/pgx/v4 v4.14.1
github.com/mattn/go-sqlite3 v1.14.9
github.com/numary/machine v0.0.0-20211228135133-02d538034686
github.com/numary/machine v1.0.0
github.com/ory/dockertest/v3 v3.8.1
github.com/pborman/uuid v1.2.1
github.com/pkg/errors v0.9.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,8 @@ github.com/numary/machine v0.0.0-20210702091459-23a82555adbf/go.mod h1:WAFvefAGY
github.com/numary/machine v0.0.0-20210831114934-e54c99840e08/go.mod h1:KulcZIlMidEjXmuFSGNckmk0pKr4HFKFYy3bB+ksWSQ=
github.com/numary/machine v0.0.0-20211228135133-02d538034686 h1:UBmc1osTD5dun7K8UzFjX8OraASMDaWSQbI8gBYc4QA=
github.com/numary/machine v0.0.0-20211228135133-02d538034686/go.mod h1:lSdeCwegoylxgHOl6wBC9BgOo2N35ra53aTsRybmJsc=
github.com/numary/machine v1.0.0 h1:WCs68NGEAuoExkzLyL9HVRG0EssysXcDY/9gLWLYtxM=
github.com/numary/machine v1.0.0/go.mod h1:lSdeCwegoylxgHOl6wBC9BgOo2N35ra53aTsRybmJsc=
github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
Expand Down

0 comments on commit 61d2ec5

Please sign in to comment.