upgrade to phpstan 2 #1516
This file contains 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: Mapped Repair Events CI | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
- '**.css' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- '**.css' | |
jobs: | |
ci: | |
runs-on: ubuntu-22.04 | |
name: Mapped Repair Events CI | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run Docker Compose | |
run: CURRENT_UID=$(id -u):$(id -g) docker compose up -d | |
- name: Setup Dev Environment | |
run: | | |
bash ./devtools/set-permissions.sh | |
cp ./.github/workflows/app_custom.php ./config/app_custom.php | |
docker exec -w /app rep.php composer install | |
docker exec -w /app/webroot rep.php npm install | |
- name: Upload Files to Server | |
if: ${{ github.event_name == 'push' }} | |
uses: up9cloud/action-rsync@master | |
env: | |
HOST: ${{secrets.DEPLOY_HOST}} | |
USER: ${{secrets.DEPLOY_USER}} | |
KEY: ${{secrets.DEPLOY_SSH_KEY}} | |
SOURCE: ./webroot/node_modules | |
TARGET: ${{secrets.DEPLOY_PATH}}/builds/${{github.ref}}/webroot | |
RUN_SCRIPT_ON: remote | |
PRE_SCRIPT: | | |
echo ${{secrets.DEPLOY_PATH}}/builds/${{github.ref}}/webroot | |
mkdir -p ${{secrets.DEPLOY_PATH}}/builds/${{github.ref}}/webroot | |
SSH_ARGS: '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' | |
- name: PHPStan | |
run: docker exec -w /app rep.php php ./vendor/bin/phpstan analyze -c phpstan.neon --no-interaction --no-progress | |
- name: ESLint | |
run: docker exec -w /app rep.php bash ./devtools/eslint.sh | |
- name: PHPUnit Tests | |
if: always() | |
run: docker exec -w /app rep.php php ./vendor/bin/phpunit --coverage-clover ./coverage.xml | |
- name: Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: ./coverage.xml | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |