Skip to content

Commit

Permalink
Merge pull request #1885 from tisnik/consumers-coverage
Browse files Browse the repository at this point in the history
Consumers-only tests on CI
  • Loading branch information
tisnik authored Nov 14, 2023
2 parents 4cc18c2 + bf2702d commit a8a1f63
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/consumers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Go tests

on:
push:
branches:
- master
pull_request:

jobs:
gotests:
env:
TEST_TO_RUN: ./consumer
runs-on: ubuntu-20.04
strategy:
matrix:
go-version:
- "1.18"
- "1.19"
- "1.20"
- "1.21"
name: Consumers tests for Go ${{ matrix.go-version}}
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Print env vars
run: env
- name: Unit tests
run: make test
- name: Check code coverage
run: ./check_coverage.sh
- name: Display code coverage
run: make coverage

0 comments on commit a8a1f63

Please sign in to comment.