Merge pull request #354 from nic11/patch-1 #255
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: # Array of patterns that match refs/heads | |
- master # Push events on master branch | |
- releases/* # Push events to branches matching refs/heads/releases/* | |
pull_request: # Specify a second event with pattern matching | |
jobs: | |
test: | |
name: Test go - ${{ matrix.go_version }} mysql - ${{ matrix.db_versions.mysql_version}} postgres - ${{ matrix.db_versions.postgres_version}} sqlserver- ${{ matrix.db_versions.sqlserver_version}} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go_version: ["1.19", "latest"] | |
db_versions: | |
- mysql_version: 5.7 | |
postgres_version: 9 | |
sqlserver_version: "2017-latest" | |
- mysql_version: "8.0" | |
postgres_version: 10 | |
sqlserver_version: "2019-latest" | |
- mysql_version: 8 | |
postgres_version: 11 | |
sqlserver_version: "2022-latest" | |
- mysql_version: 8 | |
postgres_version: 15 | |
sqlserver_version: "2022-latest" | |
env: | |
GO_VERSION: ${{ matrix.go_version }} | |
MYSQL_VERSION: ${{ matrix.db_versions.mysql_version }} | |
POSTGRES_VERSION: ${{ matrix.db_versions.postgres_version }} | |
SQLSERVER_VERSION: ${{ matrix.db_versions.sqlserver_version }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Test | |
run: docker-compose run goqu-coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: unittests | |
env_vars: OS,MYSQL_VERSION,POSTGRES_VERSION,SQLSERVER_VERSION | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
verbose: true |