generated from cloudoperators/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (35 loc) · 1.07 KB
/
tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: "Tests"
on: [pull_request]
jobs:
tests:
runs-on: [ default ]
services:
mariadb:
image: mariadb:latest
ports:
- "3306:3306"
env:
MARIADB_USER: my_username
MARIADB_PASSWORD: my_password
MARIADB_DATABASE: heureka
MARIADB_ROOT_PASSWORD: my_password
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Install Ginkgo
run: go install github.com/onsi/ginkgo/v2/ginkgo
- name: Run Tests
env:
DB_USER: my_username
DB_PASSWORD: my_password
DB_ROOT_PASSWORD: my_password
DB_NAME: heureka
DB_ADDRESS: localhost
DB_PORT: 3306
DB_SCHEMA: internal/database/mariadb/init/schema.sql
LOCAL_TEST_DB: true
run: ginkgo -r -randomize-all -randomize-suites