mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
16f46c1e14
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.4.0 to 2.4.1. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v2.4.0...v2.4.1) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
60 lines
1.9 KiB
YAML
60 lines
1.9 KiB
YAML
name: 'Test the DMS Container Image'
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
cache-key:
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
run-tests:
|
|
name: 'Test'
|
|
runs-on: ubuntu-22.04
|
|
strategy:
|
|
matrix:
|
|
part: [serial, parallel/set1, parallel/set2, parallel/set3]
|
|
fail-fast: false
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
# Required to retrieve bats (core + extras):
|
|
submodules: recursive
|
|
|
|
# Get the cached build layers from the build job:
|
|
# This should always be a cache-hit, thus `restore-keys` fallback is not used.
|
|
# No new cache uploads should ever happen for this job.
|
|
- name: 'Retrieve image built from build cache'
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: /tmp/.buildx-cache
|
|
key: cache-buildx-${{ inputs.cache-key }}
|
|
|
|
# Configures buildx to use `docker-container` driver,
|
|
# Ensures consistent BuildKit version (not coupled to Docker Engine),
|
|
# and increased compatibility of the build cache vs mixing buildx drivers.
|
|
- name: 'Set up Docker Buildx'
|
|
uses: docker/setup-buildx-action@v2.4.1
|
|
|
|
# Importing from the cache should create the image within approx 30 seconds:
|
|
# NOTE: `qemu` step is not needed as we only test for AMD64.
|
|
- name: 'Build AMD64 image from cache'
|
|
uses: docker/build-push-action@v4.0.0
|
|
with:
|
|
context: .
|
|
tags: mailserver-testing:ci
|
|
# Export the built image to the Docker host for use with BATS:
|
|
load: true
|
|
# Rebuilds the AMD64 image from the cache:
|
|
platforms: linux/amd64
|
|
cache-from: type=local,src=/tmp/.buildx-cache
|
|
# Disable provenance attestation: https://docs.docker.com/build/attestations/slsa-provenance/
|
|
provenance: false
|
|
|
|
- name: 'Run tests'
|
|
run: make generate-accounts tests/${{ matrix.part }}
|