ci: slim test workflow to lint + unit tests, drop Postgres service
This commit is contained in:
@@ -10,24 +10,6 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: go-ci
|
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:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -57,14 +39,6 @@ jobs:
|
|||||||
if: steps.gomod.outputs.present == 'true'
|
if: steps.gomod.outputs.present == 'true'
|
||||||
run: golangci-lint run ./...
|
run: golangci-lint run ./...
|
||||||
|
|
||||||
- name: go test (race + coverage)
|
- name: go test (short, race)
|
||||||
if: steps.gomod.outputs.present == 'true'
|
if: steps.gomod.outputs.present == 'true'
|
||||||
run: go test -race -coverprofile=coverage.out ./...
|
run: go test -short -race ./...
|
||||||
|
|
||||||
- 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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user