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