fix(cache): always sweep the cache dir, and say who owns what a purge… #683
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Verify | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| check: | |
| name: Check for conflict markers | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Fail if conflict markers are present | |
| run: | | |
| # Match the conflict opener/closer at start of line (with a space or | |
| # end-of-line after the 7 chars). Bare "=======" is skipped on purpose | |
| # -- it appears legitimately in Markdown/reST underlines. | |
| if grep -rnE '^(<{7}|>{7})( |$)' \ | |
| --binary-files=without-match \ | |
| --exclude-dir=.git \ | |
| --exclude-dir=vendor \ | |
| --exclude-dir=node_modules \ | |
| .; then | |
| echo "::error::Merge conflict markers found — resolve them before merging." | |
| exit 1 | |
| fi | |
| echo "No conflict markers found." | |
| di-container: | |
| name: DI container compiles | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| extensions: json, mbstring | |
| tools: composer:v2 | |
| coverage: none | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress --no-interaction | |
| - name: Provide a config (per-instance config.*.php is gitignored) | |
| run: cp configs/config.production.dist.php configs/config.production.php | |
| - name: Compile the DI container | |
| # Forces PHP-DI compilation in CLI so a definition the container cannot | |
| # autowire (e.g. an exception with a required constructor arg) fails CI | |
| # instead of 500-ing production, where the container is compiled lazily. | |
| run: composer check-di | |
| interface-api-tests: | |
| name: Interface API tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| extensions: json, mbstring | |
| tools: composer:v2 | |
| coverage: none | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress --no-interaction | |
| - name: Run PHPUnit | |
| run: composer test | |
| - name: Check PHP syntax | |
| run: | | |
| find app/classes/Contracts/InterfaceApi app/classes/Repositories/InterfaceApi \ | |
| app/classes/Services/InterfaceApi app/classes/HttpHandlers/InterfaceApi \ | |
| app/classes/Http tests -name '*.php' -print0 | xargs -0 -n1 php -l | |
| find app/classes/Middlewares/Api -name 'Interface*.php' -print0 \ | |
| | xargs -0 -n1 php -l | |
| php -l app/classes/Exceptions/InterfaceApiException.php | |
| php -l app/classes/Services/InterfacingService.php | |
| find app/classes/Services -maxdepth 1 -name "Instrument*.php" -print0 \ | |
| | xargs -0 -n1 php -l | |
| php -l app/classes/Middlewares/Api/ApiAuthMiddleware.php | |
| php -l app/facilities/editFacility.php | |
| php -l app/facilities/interfaceConnectionAction.php | |
| php -l app/facilities/partials/interface-connections.php | |
| php -l app/system/di.php | |
| php -l bin/interface-api.php | |
| php -l public/api/index.php | |
| - name: Check coding style | |
| run: | | |
| vendor/bin/phpcs --standard=PSR12 \ | |
| app/classes/Contracts/InterfaceApi app/classes/Repositories/InterfaceApi \ | |
| app/classes/Services/InterfaceApi app/classes/HttpHandlers/InterfaceApi \ | |
| app/classes/Http app/classes/Exceptions/InterfaceApiException.php \ | |
| app/classes/Services/InterfacingService.php \ | |
| app/classes/Services/InstrumentActivityService.php \ | |
| app/classes/Services/InstrumentUsageStatisticsService.php \ | |
| app/classes/Middlewares/Api/Interface*.php \ | |
| app/facilities/interfaceConnectionAction.php \ | |
| app/facilities/partials/interface-connections.php tests bin/interface-api.php | |
| vendor/bin/phpcs --standard=PSR12 --runtime-set ignore_warnings_on_exit 1 \ | |
| app/classes/Middlewares/Api/ApiAuthMiddleware.php app/system/di.php \ | |
| public/api/index.php | |
| vendor/bin/yaml-lint docs/api/openapi.yaml \ | |
| .github/workflows/no-conflict-markers.yml |