Skip to content

Merge pull request #132 from anstiftung/issue-130-info-sheet-adaption… #842

Merge pull request #132 from anstiftung/issue-130-info-sheet-adaption…

Merge pull request #132 from anstiftung/issue-130-info-sheet-adaption… #842

Workflow file for this run

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@v3
- 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
docker exec -i rep.mysql.test mysql -h 127.0.0.1 --port 3331 -umy_user -ppassword my_app < ./config/sql/database.sql
docker exec -i rep.mysql.test mysql -h 127.0.0.1 --port 3331 -umy_user -ppassword my_app < ./config/sql/truncate-all-tables.sql
- 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
run: docker exec -w /app rep.php php ./vendor/bin/phpunit --coverage-clover ./coverage.xml
- name: Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml