Add request level metrics #68
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: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
run-tests: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21.x' | |
- name: Build | |
run: go build -v ./... | |
- name: Install Task | |
run: | | |
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b $HOME/bin | |
echo "$HOME/bin" >> $GITHUB_PATH | |
- name: Setup gotestfmt | |
uses: gotesttools/gotestfmt-action@v2 | |
- name: Install golang-migrate | |
run: go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@v4.16.2 | |
- name: Run Smoke Test | |
run: task smoketest | |
- name: Test | |
run: task test | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
services: | |
postgres: | |
image: postgres:15-alpine | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 |