GitHub Action that leverages Google´s Container Structure Tests to run unit tests on your Docker images.
steps:
uses: brpaz/[email protected]
with:
image: myimage:latest
configFile: structure-tests.yaml
env:
TEST_IMAGE_TAG: image:${{ github.sha }}
jobs:
test:
name: Test
runs-on: ubuntu-latest
needs: [lint]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build test image
uses: docker/build-push-action@v5
with:
context: .
load: true
tags: ${{ env.TEST_IMAGE_TAG }}
- name: Test
uses: brpaz/[email protected]
with:
image: ${{ env.TEST_IMAGE_TAG }}
configFile: structure-tests.yaml
image
Required The image name to test
configFile
Required The path to the structure tests configuration file. Defaults to structure-tests.yaml
Check CONTRIBUTING.md for details.
If you find this project helpful and would like to support its development, there are a few ways you can contribute:
👤 Bruno Paz
- Website: https://github.com/brpaz
- Github: @brpaz
Copyright © 2019 Bruno Paz.
This project is MIT licensed.