+17
-9
@@ -1,6 +1,6 @@
|
||||
# Gitea Actions — requires Gitea 1.19+ with Actions enabled and at least one act_runner
|
||||
# whose labels include the job's runs-on value (this repo uses label `ssh`). See:
|
||||
# https://docs.gitea.com/usage/actions/quickstart
|
||||
# Gitea Actions — act_runner (e.g. v0.2.11) does not run actions that use unsupported Node
|
||||
# runtimes (shivammathur/setup-php currently declares node24). Use system PHP + Composer on the runner.
|
||||
# https://docs.gitea.com/usage/actions/faq
|
||||
#
|
||||
# Explicit https://github.com/... action URLs work on all instances; short names also work
|
||||
# when the server fetches actions from GitHub (default) or from self with [actions].DEFAULT_ACTIONS_URL.
|
||||
@@ -19,14 +19,22 @@ jobs:
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: https://github.com/shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.2'
|
||||
coverage: none
|
||||
- name: Verify PHP (8.1+)
|
||||
run: |
|
||||
set -euo pipefail
|
||||
php -v
|
||||
php -r 'if (version_compare(PHP_VERSION, "8.1.0", "<")) { fwrite(STDERR, "PHP 8.1+ required on PATH\n"); exit(1); }'
|
||||
|
||||
- name: Composer install (dev tools)
|
||||
run: composer install --no-interaction --prefer-dist
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if command -v composer >/dev/null 2>&1; then
|
||||
composer install --no-interaction --prefer-dist
|
||||
else
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar install --no-interaction --prefer-dist
|
||||
rm -f composer.phar
|
||||
fi
|
||||
|
||||
- name: PHPUnit
|
||||
run: ./vendor/bin/phpunit -c phpunit.xml.dist
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# GitHub Actions / editor compatibility — Gitea runs workflows from `.gitea/workflows` first when
|
||||
# that directory exists; keep this file in sync with `.gitea/workflows/ci.yml`.
|
||||
# GitHub Actions / editor compatibility — keep in sync with `.gitea/workflows/ci.yml`.
|
||||
# act_runner-compatible: no shivammathur/setup-php (uses node24; older act_runner rejects it).
|
||||
|
||||
name: CI
|
||||
|
||||
@@ -15,14 +15,22 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.2'
|
||||
coverage: none
|
||||
- name: Verify PHP (8.1+)
|
||||
run: |
|
||||
set -euo pipefail
|
||||
php -v
|
||||
php -r 'if (version_compare(PHP_VERSION, "8.1.0", "<")) { fwrite(STDERR, "PHP 8.1+ required on PATH\n"); exit(1); }'
|
||||
|
||||
- name: Composer install (dev tools)
|
||||
run: composer install --no-interaction --prefer-dist
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if command -v composer >/dev/null 2>&1; then
|
||||
composer install --no-interaction --prefer-dist
|
||||
else
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar install --no-interaction --prefer-dist
|
||||
rm -f composer.phar
|
||||
fi
|
||||
|
||||
- name: PHPUnit
|
||||
run: ./vendor/bin/phpunit -c phpunit.xml.dist
|
||||
|
||||
@@ -198,7 +198,7 @@ composer install
|
||||
./vendor/bin/phpcs --standard=phpcs.xml
|
||||
```
|
||||
|
||||
**CI (Gitea Actions):** primary workflow [`.gitea/workflows/ci.yml`](.gitea/workflows/ci.yml). Gitea checks `.gitea/workflows` before `.github/workflows`, so that file is what runs on Gitea. On Gitea **1.19+**, enable Actions if needed (`[actions] ENABLED=true` before 1.21), register an [act runner](https://docs.gitea.com/usage/actions/act-runner), and ensure a runner accepts `runs-on: ssh` (see [`.gitea/workflows/ci.yml`](.gitea/workflows/ci.yml); change the label if your runner uses a different one). [`.github/workflows/ci.yml`](.github/workflows/ci.yml) duplicates the same steps for GitHub Actions (short `uses:` names); edit both when you change CI (the Gitea file uses explicit `https://github.com/...` action URLs, which Gitea documents for predictable resolution). The module’s [`Magesail/composer.json`](Magesail/composer.json) targets Magento **2.4.x** (`magento/framework` **>=103.0 <106**, etc.); install that package inside a Magento project with Composer + `repo.magento.com` credentials.
|
||||
**CI (Gitea Actions):** primary workflow [`.gitea/workflows/ci.yml`](.gitea/workflows/ci.yml). Gitea checks `.gitea/workflows` before `.github/workflows`, so that file is what runs on Gitea. On Gitea **1.19+**, enable Actions if needed (`[actions] ENABLED=true` before 1.21), register an [act runner](https://docs.gitea.com/usage/actions/act-runner), and ensure a runner accepts `runs-on: ssh` (see [`.gitea/workflows/ci.yml`](.gitea/workflows/ci.yml); change the label if your runner uses a different one). The job uses **PHP and Composer on the runner’s PATH** (no `setup-php` action: current **act_runner** builds only support older Node runtimes for composite actions, while upstream `setup-php` targets Node 24). [`.github/workflows/ci.yml`](.github/workflows/ci.yml) mirrors the same steps (short `uses:` names for checkout). The module’s [`Magesail/composer.json`](Magesail/composer.json) targets Magento **2.4.x** (`magento/framework` **>=103.0 <106**, etc.); install that package inside a Magento project with Composer + `repo.magento.com` credentials.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user