Skip to content

replace to fork

replace to fork #13

Workflow file for this run

# Database Gateway provides access to servers with ACL for safe and restricted database interactions.
# Copyright (C) 2024 Kirill Zhuravlev
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
name: Test
on:
pull_request:
branches: [ 'main' ]
push:
tags: [ '*' ]
branches: [ 'main' ]
jobs:
build:
name: Build on golang ${{ matrix.go_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go_version:
- "1.23"
os:
- "ubuntu-latest"
- "macOS-latest"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go_version }}
id: go
- name: Get dependencies
run: go mod download
- name: Build
run: |
go build -v -o /dev/null ./cmd/gateway
- name: Test
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}