github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/.github/workflows/mint.yml (about)

     1  name: Mint Tests
     2  
     3  on:
     4    pull_request:
     5      branches:
     6        - master
     7        - next
     8  
     9  # This ensures that previous jobs for the PR are canceled when the PR is
    10  # updated.
    11  concurrency:
    12    group: ${{ github.workflow }}-${{ github.head_ref }}
    13    cancel-in-progress: true
    14  
    15  permissions:
    16    contents: read
    17  
    18  jobs:
    19    mint-test:
    20      runs-on: mint
    21      timeout-minutes: 120
    22      steps:
    23        - name: cleanup #https://github.com/actions/checkout/issues/273
    24          run: |
    25            sudo -S rm -rf ${GITHUB_WORKSPACE}
    26            mkdir ${GITHUB_WORKSPACE}
    27        - name: checkout-step
    28          uses: actions/checkout@v3
    29  
    30        - name: setup-go-step
    31          uses: actions/setup-go@v2
    32          with:
    33            go-version: 1.21.x
    34  
    35        - name: github sha short
    36          id: vars
    37          run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
    38  
    39        - name: build-minio
    40          run: |
    41            TAG="quay.io/minio/minio:${{ steps.vars.outputs.sha_short }}" make docker
    42  
    43        - name: multipart uploads test
    44          run: |
    45            ${GITHUB_WORKSPACE}/.github/workflows/multipart/migrate.sh "${{ steps.vars.outputs.sha_short }}"
    46  
    47        - name: compress and encrypt
    48          run: |
    49            ${GITHUB_WORKSPACE}/.github/workflows/run-mint.sh "compress-encrypt" "minio" "minio123" "${{ steps.vars.outputs.sha_short }}"
    50  
    51        - name: multiple pools
    52          run: |
    53            ${GITHUB_WORKSPACE}/.github/workflows/run-mint.sh "pools" "minio" "minio123" "${{ steps.vars.outputs.sha_short }}"
    54  
    55        - name: standalone erasure
    56          run: |
    57            ${GITHUB_WORKSPACE}/.github/workflows/run-mint.sh "erasure" "minio" "minio123" "${{ steps.vars.outputs.sha_short }}"
    58  
    59        - name: The job must cleanup
    60          if: ${{ always() }}
    61          run: |
    62            export JOB_NAME=${{ steps.vars.outputs.sha_short }}
    63            for mode in $(echo compress-encrypt pools erasure); do
    64               docker-compose -f ${GITHUB_WORKSPACE}/.github/workflows/mint/minio-${mode}.yaml down || true
    65               docker-compose -f ${GITHUB_WORKSPACE}/.github/workflows/mint/minio-${mode}.yaml rm || true
    66            done
    67  
    68            docker-compose -f ${GITHUB_WORKSPACE}/.github/workflows/multipart/docker-compose-site1.yaml rm -s -f || true
    69            docker-compose -f ${GITHUB_WORKSPACE}/.github/workflows/multipart/docker-compose-site2.yaml rm -s -f || true
    70            for volume in $(docker volume ls -q | grep minio); do
    71              docker volume rm ${volume} || true
    72            done
    73  
    74            docker rmi -f quay.io/minio/minio:${{ steps.vars.outputs.sha_short }}
    75            docker system prune -f || true
    76            docker volume prune -f || true
    77            docker volume rm $(docker volume ls -q -f dangling=true) || true