2021-11-01 16:42:48 -04:00
|
|
|
name: Linters and Tests
|
2021-06-18 15:08:33 -04:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2024-05-22 19:07:14 -04: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.
|
2024-05-22 19:07:14 -04:00
|
|
|
concurrency:
|
2021-11-01 16:42:48 -04:00
|
|
|
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:
|
2024-05-09 04:36:00 -04:00
|
|
|
go-version: [1.22.x]
|
2024-05-23 18:29:33 -04:00
|
|
|
os: [ubuntu-latest, Windows]
|
2021-06-18 15:08:33 -04:00
|
|
|
steps:
|
2024-03-28 19:44:49 -04:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
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 }}
|
2024-05-23 18:29:33 -04:00
|
|
|
if: matrix.os == 'Windows'
|
2021-06-18 15:08:33 -04:00
|
|
|
env:
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
GO111MODULE: on
|
|
|
|
run: |
|
2024-05-22 19:07:14 -04:00
|
|
|
Set-MpPreference -DisableRealtimeMonitoring $true
|
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
|
2024-05-22 19:07:14 -04:00
|
|
|
go test -v --timeout 120m ./...
|
2021-06-18 15:08:33 -04:00
|
|
|
- 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
|