add readme
This commit is contained in:
parent
f923c7d1da
commit
b7140972a3
@ -1,12 +1,8 @@
|
|||||||
name: build
|
name: pest
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
tag:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: latest
|
|
||||||
image:
|
image:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
@ -21,7 +17,7 @@ on:
|
|||||||
default: ${{ vars.REGISTRY_PASSWORD }}
|
default: ${{ vars.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
pest:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
container:
|
container:
|
||||||
image: ${{ inputs.image }}
|
image: ${{ inputs.image }}
|
||||||
|
49
README.md
Normal file
49
README.md
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
# Pest Workflow
|
||||||
|
|
||||||
|
This workflow automates running tests using the Pest framework for PHP. It runs inside a Docker container for consistent test execution across different environments.
|
||||||
|
|
||||||
|
## Usage Example
|
||||||
|
|
||||||
|
In this example, the `pest` workflow uses Pest to run the tests within the application. You can override the Docker image if needed.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
jobs:
|
||||||
|
pest:
|
||||||
|
uses: your-repo/.github/workflows/pest.yml@main
|
||||||
|
```
|
||||||
|
|
||||||
|
### Input Parameters
|
||||||
|
|
||||||
|
- **image** (optional):
|
||||||
|
- **Type:** `string`
|
||||||
|
- **Default:** `git.qlic.nl/qlic/quality:latest`
|
||||||
|
- **Description:** Docker image used for the testing process. If not provided, it defaults to the latest version of the quality check image from the QLIC registry.
|
||||||
|
|
||||||
|
- **username** (optional):
|
||||||
|
- **Type:** `string`
|
||||||
|
- **Default:** `${{ vars.REGISTRY_USERNAME }}`
|
||||||
|
- **Description:** Username for Docker registry authentication. If not provided, the default value stored in `REGISTRY_USERNAME` is used.
|
||||||
|
|
||||||
|
- **password** (optional):
|
||||||
|
- **Type:** `string`
|
||||||
|
- **Default:** `${{ vars.REGISTRY_PASSWORD }}`
|
||||||
|
- **Description:** Password for Docker registry authentication. If not provided, the default value stored in `REGISTRY_PASSWORD` is used.
|
||||||
|
|
||||||
|
## Workflow Job: `pest`
|
||||||
|
|
||||||
|
The `pest` job runs tests using the Pest PHP testing framework.
|
||||||
|
|
||||||
|
### Steps
|
||||||
|
|
||||||
|
1. **Setup Composer:**
|
||||||
|
- **Action:**
|
||||||
|
Uses (`https://git.qlic.nl/actions/setup-composer@main`) to install necessary PHP dependencies, including Pest.
|
||||||
|
- **Description:** Installs the dependencies defined in `composer.json`, setting up the environment to run Pest tests.
|
||||||
|
|
||||||
|
2. **Run Pest:**
|
||||||
|
- **Run Command:**
|
||||||
|
```bash
|
||||||
|
./vendor/bin/pest
|
||||||
|
```
|
||||||
|
- **Description:** Executes the Pest test runner to run all defined tests in the project. Pest is a testing framework for PHP, known for its simplicity and expressive syntax.
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user