2023-03-29 14:38:43 -04:00
|
|
|
name: Mint Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2023-07-14 19:42:35 -04:00
|
|
|
- master
|
2023-03-29 14:38:43 -04:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
mint-test:
|
|
|
|
runs-on: mint
|
|
|
|
timeout-minutes: 120
|
|
|
|
steps:
|
|
|
|
- name: cleanup #https://github.com/actions/checkout/issues/273
|
|
|
|
run: |
|
|
|
|
sudo -S rm -rf ${GITHUB_WORKSPACE}
|
|
|
|
mkdir ${GITHUB_WORKSPACE}
|
|
|
|
- name: checkout-step
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: setup-go-step
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2023-08-10 10:13:58 -04:00
|
|
|
go-version: 1.21.x
|
2023-03-29 14:38:43 -04:00
|
|
|
|
|
|
|
- name: github sha short
|
|
|
|
id: vars
|
|
|
|
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
|
|
|
|
|
|
- name: build-minio
|
|
|
|
run: |
|
2023-07-14 19:42:35 -04:00
|
|
|
TAG="minio/minio:${{ steps.vars.outputs.sha_short }}" make docker
|
2023-03-29 14:38:43 -04:00
|
|
|
|
|
|
|
- name: compress and encrypt
|
|
|
|
run: |
|
|
|
|
${GITHUB_WORKSPACE}/.github/workflows/run-mint.sh "compress-encrypt" "minio" "minio123" "${{ steps.vars.outputs.sha_short }}"
|
|
|
|
|
|
|
|
- name: multiple pools
|
|
|
|
run: |
|
|
|
|
${GITHUB_WORKSPACE}/.github/workflows/run-mint.sh "pools" "minio" "minio123" "${{ steps.vars.outputs.sha_short }}"
|
|
|
|
|
|
|
|
- name: standalone erasure
|
|
|
|
run: |
|
|
|
|
${GITHUB_WORKSPACE}/.github/workflows/run-mint.sh "erasure" "minio" "minio123" "${{ steps.vars.outputs.sha_short }}"
|
|
|
|
|
2023-07-14 19:42:35 -04:00
|
|
|
- name: The job must cleanup
|
|
|
|
if: ${{ always() }}
|
|
|
|
run: |
|
|
|
|
export JOB_NAME=${{ steps.vars.outputs.sha_short }}
|
|
|
|
for mode in $(echo compress-encrypt pools erasure); do
|
|
|
|
docker-compose -f ${GITHUB_WORKSPACE}/.github/workflows/mint/minio-${mode}.yaml down || true
|
|
|
|
docker-compose -f ${GITHUB_WORKSPACE}/.github/workflows/mint/minio-${mode}.yaml rm || true
|
|
|
|
done
|
|
|
|
docker rmi -f minio/minio:${{ steps.vars.outputs.sha_short }}
|
|
|
|
docker system prune -f || true
|
|
|
|
docker volume prune -f || true
|
|
|
|
docker volume rm $(docker volume ls -q -f dangling=true) || true
|