mirror of
https://github.com/acaloiaro/neoq
synced 2026-07-21 10:12:18 +00:00
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
name: test
|
|
on: [push]
|
|
|
|
concurrency:
|
|
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
name: test
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:14-alpine
|
|
env:
|
|
POSTGRES_PASSWORD: postgres
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
redis:
|
|
image: redis
|
|
options: >-
|
|
--health-cmd "redis-cli ping"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
|
|
container: golang:1.20
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: test
|
|
run: make mod test coverage
|
|
env:
|
|
TEST_DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
|
|
TEST_REDIS_URL: redis:6379
|
|
- name: upload results
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: Upload test coverage
|
|
path: tmp/coverage
|
|
- name: function coverage
|
|
run: make func-coverage
|