-
Notifications
You must be signed in to change notification settings - Fork 84
44 lines (39 loc) · 1.13 KB
/
ci.yaml
File metadata and controls
44 lines (39 loc) · 1.13 KB
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
37
38
39
40
41
42
43
44
name: Run Integration Tests
on: [push]
jobs:
integration-test:
name: Integration Tests
strategy:
matrix:
os: [ubuntu-latest]
goVer: ['1.26']
# Defines the platform for each test run.
runs-on: ${{ matrix.os }}
env:
DB_USER: user
DB_PASSWORD: password
DB_NAME: products
# define the container services used to run integration tests
steps:
# Checks out our code locally so we can work with the files.
- name: Checkout code
uses: actions/checkout@v5
# The steps that will be run through for each version and platform combination.
- name: Set up Go ${{ matrix.goVer }}
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.goVer }}
cache: true
# Runs go test ./... against postgres container
- name: Test Postgres
run: |
go test -v -count=1 ./...
env:
DB_DRIVER: postgres
DB_USER: postgres
# Runs go test ./... against mysql container
- name: Test MySQL
run: |
go test -v -count=1 ./...
env:
DB_DRIVER: mysql