fix #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: unittest | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- "*" | |
permissions: | |
contents: read | |
jobs: | |
# go: | |
# name: go | |
# runs-on: ubuntu-latest | |
# permissions: | |
# contents: read | |
# pull-requests: write | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: actions/setup-go@v5 | |
# with: | |
# go-version: '1.21' | |
# - name: Install dependencies | |
# run: | | |
# go get . | |
# - name: Build | |
# run: make build | |
# - name: Run Go tests | |
# run: make test | |
# - name: Code Coverage Report | |
# uses: irongut/[email protected] | |
# with: | |
# filename: coverage.xml | |
# badge: true | |
# fail_below_min: true | |
# format: markdown | |
# hide_branch_rate: false | |
# hide_complexity: true | |
# indicators: true | |
# output: both | |
# thresholds: '60 80' | |
# - uses: jwalton/gh-find-current-pr@v1 | |
# id: finder | |
# - name: Add Coverage PR Comment | |
# uses: marocchino/sticky-pull-request-comment@v2 | |
# with: | |
# number: ${{ steps.finder.outputs.pr }} | |
# path: code-coverage-results.md | |
# recreate: true | |
e2e: | |
name: e2e | |
runs-on: ubuntu-latest | |
env: | |
BATS_LIB_PATH: "${{ github.workspace }}/test/bats/lib/" | |
PGHOST: postgres | |
PGUSER: postgres | |
PGPASSWORD: hackme | |
PGDATABASE: unittest | |
services: | |
postgresql: | |
image: postgres:16 | |
env: | |
POSTGRES_PASSWORD: hackme | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Bats and bats libs | |
uses: bats-core/[email protected] | |
with: | |
support-path: ${{ github.workspace }}/test/bats/lib/bats-support | |
assert-path: ${{ github.workspace }}/test/bats/lib/bats-assert | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Install app | |
run: make install | |
- name: Run bats | |
run: make bats-test |