feat(unit-test)!: remove unit-test action (#221)

This commit is contained in:
Damien Retzinger
2026-04-26 21:31:07 -04:00
committed by GitHub
parent a92fe04503
commit 98923b24c5
4 changed files with 0 additions and 135 deletions
-35
View File
@@ -1,35 +0,0 @@
name: Unit Test
on:
push:
branches:
- main
paths:
- "_test/demo-package/**"
- ".github/workflows/_internal-unit.yaml"
- "unit-test/**"
- "!(**/*.md)"
pull_request:
branches:
- main
paths:
- "_test/demo-package/**"
- ".github/workflows/_internal-unit.yaml"
- "unit-test/**"
- "!(**/*.md)"
jobs:
unit-test:
strategy:
matrix:
php_version:
- 8.2
- 8.3
- 8.4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./unit-test
with:
source_folder: _test/demo-package
php_version: ${{ matrix.php_version }}
-1
View File
@@ -26,7 +26,6 @@ Opinionated Github Actions and Workflows to make building, testing, and maintain
| Action Name | Description |
| ------------------------------------------------------ | ----------------------------------------------------------------------------------------- |
| [Unit Test](./unit-test/README.md) | A Github Action that runs the Unit Tests a Magento Package |
| [Fix Magento Install](./fix-magento-install/README.md) | A Github Action that fixes Magento before `composer install` |
| [Cache Magento](./cache-magento/README.md) | A Github Action that creates a composer cache for a Magento extension or store. |
| [Setup Magento](./setup-magento/README.md) | A Github Action that sets up Magento before `composer install` for an extension or store. |
-36
View File
@@ -1,36 +0,0 @@
# Magento 2 Unit Test Action
A Github Action that runs the Unit Tests of a Magento Package
## Inputs
See the [action.yml](./action.yml)
## Usage
```yml
name: Unit Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
unit-test:
strategy:
matrix:
php_version:
- 7.4
- 8.1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/unit-test@main
with:
php_version: ${{ matrix.php_version }}
composer_auth: ${{ secrets.COMPOSER_AUTH }}
```
-63
View File
@@ -1,63 +0,0 @@
name: "Unit Test"
author: "Graycore"
description: "A Github Action that runs the Unit Tests of a Magento Package"
inputs:
php_version:
required: true
default: "8.4"
description: "PHP Version to use"
source_folder:
required: true
default: .
description: "The source folder of the package"
test_command:
required: true
default: composer run test
description: "The test command"
composer_auth:
required: false
description: "Composer Authentication Credentials"
runs:
using: "composite"
steps:
- name: Set PHP Version
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php_version }}
- name: Get Composer Cache Directory
shell: bash
working-directory: ${{ inputs.source_folder }}
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: "Cache Composer Packages"
uses: actions/cache@v5
with:
key: "composer | v4 | ${{ hashFiles('composer.lock') }} | ${{ runner.os }} | ${{ inputs.php_version }}"
path: ${{ steps.composer-cache.outputs.dir }}
- run: composer install
name: Require and attempt install
working-directory: ${{ inputs.source_folder }}
shell: bash
env:
COMPOSER_CACHE_DIR: ${{ steps.composer-cache.outputs.dir }}
COMPOSER_AUTH: ${{ inputs.composer_auth }}
- run: ${{ inputs.test_command }}
name: Run Unit Tests
working-directory: ${{ inputs.source_folder }}
shell: bash
env:
COMPOSER_CACHE_DIR: ${{ steps.composer-cache.outputs.dir }}
COMPOSER_AUTH: ${{ inputs.composer_auth }}
branding:
icon: "code"
color: "green"