2021-11-01 13:42:48 -07:00
|
|
|
name: Linters and Tests
|
2021-06-18 12:08:33 -07:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2021-11-30 09:22:17 -08:00
|
|
|
- master
|
2021-06-18 12:08:33 -07:00
|
|
|
|
2021-11-07 01:22:59 -08:00
|
|
|
# This ensures that previous jobs for the PR are canceled when the PR is
|
2021-11-01 13:42:48 -07:00
|
|
|
# updated.
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.head_ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-04-11 04:45:59 -05:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-06-18 12:08:33 -07:00
|
|
|
jobs:
|
|
|
|
build:
|
2021-11-01 13:42:48 -07:00
|
|
|
name: Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
2021-06-18 12:08:33 -07:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-04-05 14:36:49 -07:00
|
|
|
go-version: [1.20.x]
|
2021-06-18 12:08:33 -07:00
|
|
|
os: [ubuntu-latest, windows-latest]
|
|
|
|
steps:
|
2023-03-03 10:15:03 -08:00
|
|
|
- uses: actions/checkout@v3
|
2022-03-25 19:56:04 +04:00
|
|
|
- uses: actions/setup-go@v3
|
2021-06-18 12:08:33 -07:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
2022-03-25 19:56:04 +04:00
|
|
|
check-latest: true
|
2021-06-18 12:08:33 -07:00
|
|
|
- name: Build on ${{ matrix.os }}
|
|
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
env:
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
GO111MODULE: on
|
|
|
|
run: |
|
2022-11-03 00:10:26 +08:00
|
|
|
netsh int ipv4 set dynamicport tcp start=60000 num=61000
|
2021-06-18 12:08:33 -07:00
|
|
|
go build --ldflags="-s -w" -o %GOPATH%\bin\minio.exe
|
|
|
|
go test -v --timeout 50m ./...
|
|
|
|
- name: Build on ${{ matrix.os }}
|
|
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
env:
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
GO111MODULE: on
|
|
|
|
run: |
|
2021-07-17 01:17:35 -07:00
|
|
|
sudo apt install jq -y
|
2021-06-18 12:08:33 -07:00
|
|
|
sudo sysctl net.ipv6.conf.all.disable_ipv6=0
|
|
|
|
sudo sysctl net.ipv6.conf.default.disable_ipv6=0
|
|
|
|
make
|
2021-11-01 15:03:07 -07:00
|
|
|
make test
|
2021-06-18 12:08:33 -07:00
|
|
|
make test-race
|