Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork0
GitHub Action running your TestInfra tests
License
WyriHaximus/github-action-testinfra
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
GitHub Action running yourTestInfra tests
This action supports the following option.
The Docker image to test
- Required:
Yes - Type:
string - Example:
ghcr.io/wyrihaximusnet/php:8.4-zts-alpine-slim
The path that contains the Infra tests.
- Required:
No - Type:
string - Example:
tests - Default:
test
Command to run on container start.
- Required:
No - Type:
string - Example:
sleep 600
Additional flags to pass to docker run aside--rm,-t, and-d.
- Required:
No - Type:
string - Example:
--platform="linux/arm64"
Specify a specific test suite to run.
- Required:
No - Type:
string - Example:
yes
The following example is a slimmed down version ofthe workflow that builds my self hosted GitHub Action Runner image.It shows the full
name:Continuous Integrationenv:DOCKER_IMAGE:wyrihaximusnet/github-action-runneron:push:branches: -'main'jobs:supported-platform-matrix:name:Supported processor platformsruns-on:ubuntu-latestoutputs:platform:${{ steps.supported-platform-matrix.outputs.platform }}steps: -id:supported-platform-matrixname:Generate platformuses:WyriHaximus/github-action-oci-image-supported-platforms@v1build-docker-image:name:Build ${{ matrix.platform }} imagestrategy:fail-fast:falsematrix:platform:${{ fromJson(needs.supported-platform-matrix.outputs.platform) }}needs: -supported-platform-matrixruns-on:${{ contains(matrix.platform, 'arm') && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}steps: -name:Preparerun:| platform=${{ matrix.platform }} echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV -run:docker image build --platform=${{ matrix.platform }} --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VCS_REF=`git rev-parse --short HEAD` -t "${DOCKER_IMAGE}:${{ env.PLATFORM_PAIR }}" --no-cache .tests:name:Test ${{ matrix.platform }}needs: -supported-platform-matrix -build-docker-imagestrategy:fail-fast:falsematrix:platform:${{ fromJson(needs.supported-platform-matrix.outputs.platform) }}runs-on:${{ contains(matrix.platform, 'arm') && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}steps: -name:Preparerun:| platform=${{ matrix.platform }} echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV -uses:WyriHaximus/github-action-testinfra@v1with:image:${{ env.DOCKER_IMAGE }}:${{ env.PLATFORM_PAIR }}flags:--platform="${{ matrix.platform }}"cmd:node
Copyright 2025Cees-Jan Kiewiet
Permission is hereby granted, free of charge, to any personobtaining a copy of this software and associated documentationfiles (the "Software"), to deal in the Software withoutrestriction, including without limitation the rights to use,copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom theSoftware is furnished to do so, subject to the followingconditions:
The above copyright notice and this permission notice shall beincluded in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIESOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ANDNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHTHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OROTHER DEALINGS IN THE SOFTWARE.
About
GitHub Action running your TestInfra tests
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.
