ci: slim test workflow to lint + unit tests, drop Postgres service
This commit is contained in:
@@ -10,24 +10,6 @@ jobs:
|
||||
test:
|
||||
runs-on: go-ci
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
env:
|
||||
POSTGRES_USER: minstrel
|
||||
POSTGRES_PASSWORD: minstrel
|
||||
POSTGRES_DB: minstrel_test
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
--health-cmd "pg_isready -U minstrel"
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 10
|
||||
|
||||
env:
|
||||
MINSTREL_TEST_DATABASE_URL: postgres://minstrel:minstrel@postgres:5432/minstrel_test?sslmode=disable
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -57,14 +39,6 @@ jobs:
|
||||
if: steps.gomod.outputs.present == 'true'
|
||||
run: golangci-lint run ./...
|
||||
|
||||
- name: go test (race + coverage)
|
||||
- name: go test (short, race)
|
||||
if: steps.gomod.outputs.present == 'true'
|
||||
run: go test -race -coverprofile=coverage.out ./...
|
||||
|
||||
- name: Upload coverage artifact
|
||||
if: steps.gomod.outputs.present == 'true'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage
|
||||
path: coverage.out
|
||||
if-no-files-found: ignore
|
||||
run: go test -short -race ./...
|
||||
|
||||
Reference in New Issue
Block a user