mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-26 14:10:18 +01:00
2fbd19365c
In order to follow golang's best practices, we should lint the code base properly beyond usual syntax mistakes.
45 lines
963 B
YAML
45 lines
963 B
YAML
name: test
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- "*"
|
|
push:
|
|
branches:
|
|
- "*"
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
go_version:
|
|
- 1.13.x
|
|
- 1.14.x
|
|
- 1.15.x
|
|
- 1.16.x
|
|
- 1.17.x
|
|
name: Test with ${{ matrix.go_version }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v1
|
|
with:
|
|
go-version: ${{ matrix.go_version }}
|
|
- name: Vet and test
|
|
run: |
|
|
go version
|
|
go vet ./...
|
|
go test ./...
|
|
golangci:
|
|
name: Linting
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v1
|
|
with:
|
|
go-version: 1.17
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v2
|
|
with:
|
|
version: latest
|
|
skip-go-installation: true
|
|
args: "--config .golangci.yml"
|