https://github.com/draios/infra-action-test-runner
https://github.com/draios/infra-action-test-runner
github-action github-actions testing workflow
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/draios/infra-action-test-runner
- Owner: draios
- Created: 2021-12-09T17:16:18.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T18:10:04.000Z (over 1 year ago)
- Last Synced: 2025-01-31T16:52:46.722Z (over 1 year ago)
- Topics: github-action, github-actions, testing, workflow
- Homepage:
- Size: 79.1 KB
- Stars: 1
- Watchers: 10
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# action-test-runner
This Action try to generalize the way in which you can start tests.
It aim to provide common dependencies for test environment like KinD, Bats and the like
## Requirement
This actions require all the tests in the target repo to be callable using `task test` as entry point, levering [taskfile](taskfile.dev)
The other minimal entrypoints required are
- `task test`
- `task test:clean`
- `task test:logs`
## Inputs
### Required
- `github_token`: GITHUB_TOKEN secret
## Optional
- `artifact_name`: Name of the artifact to be downloaded and imported (default: "image")
- `bats_version`: BATS version (default: "1.12.0")
- `envsubst_needed`: Indicate if envsubst is needed (default: "false")
- `gar_password`: GAR Password
- `gar_registry`: GAR Registry
- `gar_username`: GAR Username
- `image_original_tag`: Original tag of the image to be imported
- `import_image_artifact`: Boolean if the image artifact should be imported (default: false)
- `kind_cluster_name`: KinD cluster name (default: kind)
- `kind_config_path`: KinD config path (default: tests/kind-config.yaml)
- `kind_kubectl_version`: the kubectl version to use with KinD (default: v1.33.4)
- `kind_log_level`: the KinD verbosity level (default: 0)
- `kind_needed`: Boolean if a Kubernetes In Docker cluster is needed for tests (default: true)
- `kind_version`: KinD version (default: "v0.30.0")
- `kind_wait`: increase the timeout for KinD to check if the control plane is ready (default: 60s)
- `local_image_name`: Name of the image to be imported (default: "testimage:local")
- `quay_password`: quay Password
- `quay_username`: quay Username
- `taskfile_name`: Name of the taskfile task to be executed (default: "test")
## Example workflow
Perform all checks on pull requests
```yaml
name: tests
on:
pull_request:
types: [opened, review_requested, ready_for_review]
jobs:
tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v5.0.0
- uses: draios/infra-action-test-runner@v3.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# this will trigger `task test` in the target repo
```