Skip to content

GitHub Action that leverages Google´s Container Structure test to run unit tests on your container images.

License

Notifications You must be signed in to change notification settings

brpaz/structure-tests-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Container Structure Tests Action

GitHub Action that leverages Google´s Container Structure Tests to run unit tests on your Docker images.

GitHub Action License Commitizen friendly CI Status

Usage

Basic usage

steps:
    uses: brpaz/[email protected]
    with:
        image: myimage:latest
        configFile: structure-tests.yaml

With Docker Actions

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

Inputs

image

Required The image name to test

configFile

Required The path to the structure tests configuration file. Defaults to structure-tests.yaml

🤝 Contributing

Check CONTRIBUTING.md for details.

🫶 Support

If you find this project helpful and would like to support its development, there are a few ways you can contribute:

Sponsor me on GitHub

Buy Me A Coffee

Author

👤 Bruno Paz

📝 License

Copyright © 2019 Bruno Paz.

This project is MIT licensed.

About

GitHub Action that leverages Google´s Container Structure test to run unit tests on your container images.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •