1
0
mirror of synced 2024-11-24 22:16:05 +03:00
mg-transport-api-client-go/.github/workflows/ci.yml

53 lines
1.3 KiB
YAML
Raw Normal View History

2020-11-26 13:28:15 +03:00
name: ci
on:
push:
branches:
- '**'
tags-ignore:
- '*.*'
pull_request:
env:
GO111MODULE: on
jobs:
2021-02-09 16:04:18 +03:00
golangci:
name: lint
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
2022-04-21 13:24:22 +03:00
- name: Set up latest Go 1.x version
uses: actions/setup-go@v2
with:
2024-02-12 15:10:10 +03:00
go-version: '1.22'
2022-04-21 13:24:22 +03:00
- name: Get dependencies
run: |
go mod tidy
2021-02-09 16:04:18 +03:00
- name: Lint code with golangci-lint
2022-04-21 13:24:22 +03:00
uses: golangci/golangci-lint-action@v3
2021-02-09 16:04:18 +03:00
with:
2023-12-29 11:44:18 +03:00
version: v1.55.2
2021-02-09 16:04:18 +03:00
only-new-issues: true
2020-11-26 13:28:15 +03:00
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
2024-02-12 15:10:10 +03:00
go-version: ['1.22']
2020-11-26 13:28:15 +03:00
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: go mod tidy
- name: Tests
run: go test ./... -v -cpu 2 -timeout 2m -race -cover -coverprofile=coverage.txt -covermode=atomic
- name: Coverage
run: bash <(curl -s https://codecov.io/bash)