64 lines
1.9 KiB
YAML
64 lines
1.9 KiB
YAML
name: Go
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
push:
|
|
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:
|
|
minio-test:
|
|
name: Integration Tests with Latest Distributed MinIO
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.17.x]
|
|
|
|
steps:
|
|
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
|
|
# To build minio image, we need to clone the repository first
|
|
- name: clone https://github.com/minio/minio
|
|
uses: actions/checkout@master
|
|
with:
|
|
|
|
# Repository name with owner. For example, actions/checkout
|
|
# Default: ${{ github.repository }}
|
|
repository: minio/minio
|
|
|
|
# Relative path under $GITHUB_WORKSPACE to place the repository
|
|
# To have two repositories under the same test
|
|
path: 'minio_repository'
|
|
|
|
- name: Build on ${{ matrix.os }}
|
|
run: |
|
|
echo "The idea is to build minio image from downloaded repository";
|
|
cd $GITHUB_WORKSPACE/minio_repository;
|
|
echo "Get git version to build MinIO Image";
|
|
VERSION=`git rev-parse HEAD`;
|
|
echo $VERSION;
|
|
echo "Create minio image";
|
|
make docker VERSION=$VERSION;
|
|
echo "Jumping back to console repository to run the integration test"
|
|
cd $GITHUB_WORKSPACE;
|
|
echo "We are going to use the built image on test-integration";
|
|
VERSION="minio/minio:$VERSION";
|
|
echo $VERSION;
|
|
make test-integration MINIO_VERSION=$VERSION;
|