use container services in integration tests (#1213)

This commit is contained in:
Harshavardhana
2021-11-10 12:10:29 -08:00
committed by GitHub
parent 9a01922c67
commit 09a5dfebbc
2 changed files with 17 additions and 13 deletions

View File

@@ -8,14 +8,21 @@ on:
branches:
- master
# This ensures that previous jobs for the PR are canceled when the PR is
# updated.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build:
minio-test:
name: Integration Tests with Latest Distributed MinIO
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.16.x]
os: [ubuntu-latest]
go-version: [1.16.x, 1.17.x]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v2
@@ -27,13 +34,5 @@ jobs:
uses: actions/checkout@v2
- name: Build on ${{ matrix.os }}
env:
GO111MODULE: on
GOOS: linux
CGO_ENABLED: 0
run: |
wget -O /tmp/minio https://dl.minio.io/server/minio/release/linux-amd64/minio
chmod +x /tmp/minio
mkdir -p /tmp/certs-dir
/tmp/minio server --quiet -S /tmp/certs-dir /tmp/fs{1...4} &
go test github.com/minio/console/integration/...
make test-integration

View File

@@ -63,6 +63,11 @@ swagger-operator:
assets:
@(cd portal-ui; yarn install; make build-static; yarn prettier --write . --loglevel warn; cd ..)
test-integration:
@(docker run -d --name minio --rm -p 9000:9000 quay.io/minio/minio:latest server /data{1...4} && sleep 5)
@(GO111MODULE=on go test -race -v github.com/minio/console/integration/...)
@(docker stop minio)
test:
@(GO111MODULE=on go test -race -v github.com/minio/console/restapi/...)