Skip to content

Merge pull request #531 from dtm-labs/dependabot/npm_and_yarn/admin/c… #993

Merge pull request #531 from dtm-labs/dependabot/npm_and_yarn/admin/c…

Merge pull request #531 from dtm-labs/dependabot/npm_and_yarn/admin/c… #993

Workflow file for this run

name: Tests
on:
push:
branches-ignore:
- 'tmp-*'
pull_request:
branches-ignore:
- 'tmp-*'
jobs:
tests:
name: CI
runs-on: ubuntu-latest
services:
mysql:
image: 'mysql:5.7'
env:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
ports:
- 3306:3306
redis:
image: 'redis'
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
ports:
- 6379:6379
postgres:
image: 'yedf/postgres-xa'
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
env:
POSTGRES_PASSWORD: mysecretpassword
POSTGRES_DB: dtm
ports:
- '5432:5432'
mongo:
image: 'yedf/mongo-rs'
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
ports:
- 27017:27017
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-latest
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
env:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: p@ssw0rd
ports:
- '1433:1433'
steps:
- name: Set up Go 1.23
uses: actions/setup-go@v2
with:
go-version: '1.23.3'
- name: Check out code
uses: actions/checkout@v2
- name: Install dependencies
run: |
go mod download
- name: Run CI lint
run: sh helper/golint.sh
- name: Run test cover
run: sh helper/test-cover.sh
- name: Upload to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.txt # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)