* rb: Fix side wide removal of an alias rb --force --dangerous should remove all buckets under an alias. This PR fixes a recent regression.
69 lines
2.1 KiB
YAML
69 lines
2.1 KiB
YAML
name: Go
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
name: Test on Go ${{ matrix.go-version }} and ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
GO111MODULE: on
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.16.x, 1.17.x]
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
steps:
|
|
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Build on ${{ matrix.os }}
|
|
if: matrix.os == 'windows-latest'
|
|
run: |
|
|
go build --ldflags="-s -w" -o %GOPATH%\bin\mc.exe
|
|
go test -v -race --timeout 30m ./...
|
|
- name: Build on ${{ matrix.os }}
|
|
if: matrix.os == 'macos-latest'
|
|
run: |
|
|
go build --ldflags="-s -w" -o %GOPATH%\bin\mc
|
|
go test -v -race --timeout 30m ./...
|
|
- name: Build on ${{ matrix.os }}
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: |
|
|
wget https://dl.min.io/server/minio/release/linux-amd64/minio && chmod +x minio
|
|
mkdir -p ~/.minio/certs/ && cp testdata/localhost.crt ~/.minio/certs/public.crt && cp testdata/localhost.key ~/.minio/certs/private.key
|
|
sudo cp testdata/localhost.crt /usr/local/share/ca-certificates/ && sudo update-ca-certificates
|
|
./minio server /tmp/test-xl/{1...4}/ & sleep 10
|
|
export SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ENABLE_HTTPS=1
|
|
make
|
|
make test-race
|
|
make verify
|
|
make crosscompile
|
|
vetchecks: # Run vet checks against one version.
|
|
env:
|
|
CGO_ENABLED: 0
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.17.x
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: fmt
|
|
run: diff -au <(gofmt -s -d .) <(printf "")
|
|
|
|
- name: Test 386
|
|
run: GOOS=linux GOARCH=386 go test -short ./...
|
|
|