mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-12-27 04:40:19 +01:00
089ff324e1
* bump go version and se gotip * bump go version and se gotip * bump go version and se gotip * bump go version and se gotip * linting * gobin * GOPATH
60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
name: test
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- "*"
|
|
push:
|
|
branches:
|
|
- "*"
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
go_version:
|
|
- '1.21'
|
|
- '1.22'
|
|
- '1.23'
|
|
- tip
|
|
name: Test with ${{ matrix.go_version }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install Go ${{ matrix.go_version }}
|
|
if: ${{ matrix.go_version != 'tip' }}
|
|
uses: actions/setup-go@master
|
|
with:
|
|
go-version: ${{ matrix.go_version }}
|
|
check-latest: true
|
|
- name: Install Go ${{ matrix.go_version }}
|
|
if: ${{ matrix.go_version == 'tip' }}
|
|
run: |
|
|
go install golang.org/dl/gotip@latest
|
|
`go env GOPATH`/bin/gotip download
|
|
- name: Vet and test no tip
|
|
if: ${{ matrix.go_version != 'tip' }}
|
|
run: |
|
|
go version
|
|
go vet ./...
|
|
go test ./...
|
|
- name: Vet and test gotip
|
|
if: ${{ matrix.go_version == 'tip' }}
|
|
run: |
|
|
`go env GOPATH`/bin/gotip version
|
|
`go env GOPATH`/bin/gotip vet ./...
|
|
`go env GOPATH`/bin/gotip test ./...
|
|
golangci:
|
|
name: Linting
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@master
|
|
with:
|
|
go-version: '1.23'
|
|
check-latest: true
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v2
|
|
with:
|
|
version: latest
|
|
skip-go-installation: true
|
|
args: "--config .golangci.yml"
|