Add trusted by section to readme (#3004) #9832
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: CI | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - "[0-9].x" | |
| pull_request: | |
| env: | |
| PHP_VERSION: 8.4 | |
| CYPRESS_PROJECT_ID: w8t3fx | |
| jobs: | |
| backend: | |
| name: Backend | |
| runs-on: ubuntu-latest | |
| services: | |
| redis: | |
| image: redis | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 6379 | |
| postgres: | |
| image: postgres:18-alpine | |
| env: | |
| POSTGRES_USER: user | |
| POSTGRES_PASSWORD: password | |
| POSTGRES_DB: test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432 | |
| mariadb: | |
| image: mariadb:11 | |
| ports: | |
| - 3306 | |
| env: | |
| MARIADB_USER: user | |
| MARIADB_PASSWORD: password | |
| MARIADB_DATABASE: test | |
| MARIADB_ROOT_PASSWORD: password | |
| options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=5s --health-timeout=2s --health-retries=3 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 2 | |
| - name: Verify MariaDB connection | |
| env: | |
| PORT: ${{ job.services.mariadb.ports[3306] }} | |
| run: | | |
| while ! mysqladmin ping -h"127.0.0.1" -P"$PORT" --silent; do | |
| sleep 1 | |
| done | |
| - name: Verify Postgres connection | |
| env: | |
| PORT: ${{ job.services.postgres.ports[5432] }} | |
| run: | | |
| while ! pg_isready -h"127.0.0.1" -p"$PORT" > /dev/null 2> /dev/null; do | |
| sleep 1 | |
| done | |
| - name: Install packages | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install pv mariadb-client | |
| - name: Setup PHP, with composer and extensions | |
| uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php | |
| with: | |
| php-version: ${{ env.PHP_VERSION }} | |
| extensions: bcmath, ctype, fileinfo, json, mbstring, dom, ldap, pdo, tokenizer, xml, mysql, sqlite, imagick, exif, intl | |
| coverage: pcov | |
| - name: Copy .env | |
| run: php -r "copy('.env.ci', '.env');" | |
| - name: Get Composer Cache Directory | |
| id: composer-cache | |
| run: | | |
| echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - name: Install php dependencies | |
| run: | | |
| composer self-update | |
| composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
| - name: Generate key | |
| run: php artisan key:generate | |
| - name: Directory Permissions | |
| run: chmod -R 777 storage bootstrap/cache | |
| - name: Migrate Database | |
| env: | |
| DB_HOST: 127.0.0.1 | |
| DB_PORT: ${{ job.services.mariadb.ports[3306] }} | |
| DB_DATABASE: test | |
| DB_USERNAME: root | |
| DB_PASSWORD: password | |
| run: php artisan migrate --no-interaction -vvv --force | |
| - name: Execute code style check via Laravel Pint | |
| run: vendor/bin/pint --test -v | |
| - name: Execute tests (Unit and Feature tests) via PHPUnit | |
| if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }} | |
| env: | |
| DB_HOST: 127.0.0.1 | |
| DB_PORT: ${{ job.services.mariadb.ports[3306] }} | |
| DB_DATABASE: test | |
| DB_USERNAME: root | |
| DB_PASSWORD: password | |
| REDIS_HOST: 127.0.0.1 | |
| REDIS_PORT: ${{ job.services.redis.ports[6379] }} | |
| LOG_CHANNEL: stack | |
| run: php artisan test --parallel --testsuite=Unit,Feature --coverage-clover=coverage.xml | |
| - name: Execute tests (Unit, Feature and Integration tests) via PHPUnit | |
| if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork }} | |
| env: | |
| DB_HOST: 127.0.0.1 | |
| DB_PORT: ${{ job.services.mariadb.ports[3306] }} | |
| DB_DATABASE: test | |
| DB_USERNAME: root | |
| DB_PASSWORD: password | |
| REDIS_HOST: 127.0.0.1 | |
| REDIS_PORT: ${{ job.services.redis.ports[6379] }} | |
| LOG_CHANNEL: stack | |
| BBB_TEST_SERVER_HOST: ${{ secrets.BBB_TEST_SERVER_HOST }} | |
| BBB_TEST_SERVER_SECRET: ${{ secrets.BBB_TEST_SERVER_SECRET }} | |
| run: php artisan test --parallel --coverage-clover=coverage.xml | |
| - name: Execute tests (Unit and Feature tests) via PHPUnit using Postgres | |
| env: | |
| DB_CONNECTION: pgsql | |
| DB_HOST: 127.0.0.1 | |
| DB_PORT: ${{ job.services.postgres.ports[5432] }} | |
| DB_DATABASE: test | |
| DB_USERNAME: user | |
| DB_PASSWORD: password | |
| REDIS_HOST: 127.0.0.1 | |
| REDIS_PORT: ${{ job.services.redis.ports[6379] }} | |
| LOG_CHANNEL: stack | |
| run: php artisan test --parallel --testsuite=Unit,Feature | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: true | |
| - name: Upload laravel logs | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: laravel-backend-tests.log | |
| path: storage/logs/laravel.log | |
| frontend-code-style-check: | |
| name: Frontend Code Style Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Copy .env | |
| run: php -r "copy('.env.example', '.env');" | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: "npm" | |
| cache-dependency-path: ./package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Check code formatting | |
| run: npm run prettier | |
| - name: Linting | |
| run: npm run lint | |
| docker-build: | |
| name: Docker Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and export | |
| uses: docker/build-push-action@v6 | |
| with: | |
| file: docker/app/Dockerfile | |
| context: . | |
| load: true | |
| tags: pilos:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| outputs: type=docker,dest=/tmp/pilos-image.tar | |
| build-args: | | |
| VITE_COVERAGE=true | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pilos-image | |
| path: /tmp/pilos-image.tar | |
| generate-frontend-matrix: | |
| name: Generate Frontend Matrix | |
| runs-on: ubuntu-latest | |
| outputs: | |
| record: ${{ steps.generate-matrix.outputs.record }} | |
| tag: ${{ steps.generate-matrix.outputs.tag }} | |
| matrix: ${{ steps.generate-matrix.outputs.matrix }} | |
| frontend_group: ${{ steps.generate-matrix.outputs.frontend_group }} | |
| visual_group: ${{ steps.generate-matrix.outputs.visual_group }} | |
| system_group: ${{ steps.generate-matrix.outputs.system_group }} | |
| steps: | |
| - name: Generate matrix | |
| id: generate-matrix | |
| run: | | |
| if [ ${{ (github.actor == 'dependabot[bot]' || github.event_name == 'push') && runner.debug != '1' }} = true ]; then | |
| record=false | |
| tag='' | |
| frontend_group='' | |
| visual_group='' | |
| system_group='' | |
| matrix='{ "containers": [1] }' | |
| else | |
| record=true | |
| tag=${{ github.event_name }} | |
| frontend_group="Frontend tests" | |
| visual_group="Visual tests" | |
| system_group="System tests" | |
| matrix='{ "containers": [1,2,3,4,5] }' | |
| fi | |
| echo "record=$record" >> "$GITHUB_OUTPUT" | |
| echo "tag=$tag" >> "$GITHUB_OUTPUT" | |
| echo "frontend_group=$frontend_group" >> "$GITHUB_OUTPUT" | |
| echo "visual_group=$visual_group" >> "$GITHUB_OUTPUT" | |
| echo "system_group=$system_group" >> "$GITHUB_OUTPUT" | |
| echo "matrix=$matrix" >> "$GITHUB_OUTPUT" | |
| frontend-tests: | |
| name: Frontend Tests | |
| runs-on: ubuntu-latest | |
| needs: | |
| - docker-build | |
| - generate-frontend-matrix | |
| strategy: | |
| # don't fail the entire matrix on failure | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.generate-frontend-matrix.outputs.matrix) }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: pilos-image | |
| path: /tmp | |
| - name: Load image | |
| run: | | |
| docker load --input /tmp/pilos-image.tar | |
| - name: Copy .env | |
| run: docker run --rm pilos:latest cat ./.env.ci > .env | |
| - name: Generate key | |
| run: | | |
| docker run --rm \ | |
| --mount type=bind,source=${{ github.workspace }}/.env,target=/var/www/html/.env \ | |
| --entrypoint /bin/bash \ | |
| pilos:latest \ | |
| -c "chown www-data:www-data .env && pilos-cli key:generate" | |
| - name: Adjust .env | |
| run: | | |
| sed -i 's/CONTAINER_IMAGE=.*/CONTAINER_IMAGE=pilos:latest/g' .env | |
| sed -i 's|APP_URL=.*|APP_URL=http://localhost:9080|g' .env | |
| sed -i 's|BBB_TEST_SERVER_HOST=.*|BBB_TEST_SERVER_HOST=${{ secrets.BBB_TEST_SERVER_HOST }}|g' .env | |
| sed -i 's|BBB_TEST_SERVER_SECRET=.*|BBB_TEST_SERVER_SECRET=${{ secrets.BBB_TEST_SERVER_SECRET }}|g' .env | |
| - name: Start app | |
| run: docker compose -f compose.test.yml -f compose.test.ci.yml up -d | |
| - name: Cypress run frontend tests | |
| uses: cypress-io/github-action@v7 | |
| with: | |
| wait-on: "http://localhost:9080" # Waits for above | |
| group: ${{ needs.generate-frontend-matrix.outputs.frontend_group }} | |
| parallel: ${{ needs.generate-frontend-matrix.outputs.record }} | |
| record: ${{ needs.generate-frontend-matrix.outputs.record }} | |
| tag: ${{ needs.generate-frontend-matrix.outputs.tag }} | |
| env: | |
| CYPRESS_PROJECT_ID: ${{ env.CYPRESS_PROJECT_ID }} | |
| CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} | |
| COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha }} | |
| APP_URL: "http://localhost:9080" | |
| TZ: "America/New_York" | |
| ELECTRON_EXTRA_LAUNCH_ARGS: "--lang=en --force-prefers-reduced-motion" | |
| - name: Upload screenshots | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: cypress-screenshots | |
| path: tests/Frontend/screenshots | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: true | |
| directory: coverage | |
| visual-tests: | |
| name: Visual Tests | |
| runs-on: ubuntu-latest | |
| needs: | |
| - docker-build | |
| - generate-frontend-matrix | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| - name: Fetch develop branch | |
| if: github.ref != 'refs/heads/develop' | |
| run: git fetch origin develop:develop | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: pilos-image | |
| path: /tmp | |
| - name: Load image | |
| run: | | |
| docker load --input /tmp/pilos-image.tar | |
| - name: Copy .env | |
| run: docker run --rm pilos:latest cat ./.env.ci > .env | |
| - name: Generate key | |
| run: | | |
| docker run --rm \ | |
| --mount type=bind,source=${{ github.workspace }}/.env,target=/var/www/html/.env \ | |
| --entrypoint /bin/bash \ | |
| pilos:latest \ | |
| -c "chown www-data:www-data .env && pilos-cli key:generate" | |
| - name: Adjust .env | |
| run: | | |
| sed -i 's/CONTAINER_IMAGE=.*/CONTAINER_IMAGE=pilos:latest/g' .env | |
| sed -i 's|APP_URL=.*|APP_URL=http://localhost:9080|g' .env | |
| sed -i 's|BBB_TEST_SERVER_HOST=.*|BBB_TEST_SERVER_HOST=${{ secrets.BBB_TEST_SERVER_HOST }}|g' .env | |
| sed -i 's|BBB_TEST_SERVER_SECRET=.*|BBB_TEST_SERVER_SECRET=${{ secrets.BBB_TEST_SERVER_SECRET }}|g' .env | |
| - name: Start app | |
| run: docker compose -f compose.test.yml -f compose.test.ci.yml up -d | |
| - name: Run cypress | |
| uses: cypress-io/github-action@v7 | |
| with: | |
| command-prefix: npx happo -- npx | |
| group: ${{ needs.generate-frontend-matrix.outputs.visual_group }} | |
| record: ${{ needs.generate-frontend-matrix.outputs.record }} | |
| tag: ${{ needs.generate-frontend-matrix.outputs.tag }} | |
| project: ./tests/Visual | |
| env: | |
| NODE_OPTIONS: "--experimental-require-module" | |
| HAPPO_API_KEY: ${{ secrets.HAPPO_API_KEY }} | |
| HAPPO_API_SECRET: ${{ secrets.HAPPO_API_SECRET }} | |
| HAPPO_DELETE_OLD_COMMENTS: true | |
| HAPPO_CONFIG_FILE: "./tests/Visual/happo.config.js" | |
| BASE_BRANCH: origin/develop | |
| CYPRESS_PROJECT_ID: ${{ env.CYPRESS_PROJECT_ID }} | |
| CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} | |
| COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha }} | |
| APP_URL: "http://localhost:9080" | |
| TZ: "America/New_York" | |
| ELECTRON_EXTRA_LAUNCH_ARGS: "--lang=en --force-prefers-reduced-motion" | |
| system-tests: | |
| name: System Tests | |
| runs-on: ubuntu-latest | |
| needs: | |
| - docker-build | |
| - generate-frontend-matrix | |
| if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: pilos-image | |
| path: /tmp | |
| - name: Load image | |
| run: | | |
| docker load --input /tmp/pilos-image.tar | |
| docker image ls -a | |
| - name: Copy .env | |
| run: docker run --rm pilos:latest cat ./.env.ci > .env | |
| - name: Generate key | |
| run: | | |
| docker run --rm \ | |
| --mount type=bind,source=${{ github.workspace }}/.env,target=/var/www/html/.env \ | |
| --entrypoint /bin/bash \ | |
| pilos:latest \ | |
| -c "chown www-data:www-data .env && pilos-cli key:generate" | |
| - name: Adjust .env | |
| run: | | |
| sed -i 's/CONTAINER_IMAGE=.*/CONTAINER_IMAGE=pilos:latest/g' .env | |
| sed -i 's|APP_URL=.*|APP_URL=http://localhost:9080|g' .env | |
| sed -i 's|BBB_TEST_SERVER_HOST=.*|BBB_TEST_SERVER_HOST=${{ secrets.BBB_TEST_SERVER_HOST }}|g' .env | |
| sed -i 's|BBB_TEST_SERVER_SECRET=.*|BBB_TEST_SERVER_SECRET=${{ secrets.BBB_TEST_SERVER_SECRET }}|g' .env | |
| - name: Start app | |
| run: docker compose -f compose.test.yml -f compose.test.ci.yml up -d | |
| - name: Cypress run system tests | |
| uses: cypress-io/github-action@v7 | |
| with: | |
| wait-on: "http://localhost:9080" # Waits for above | |
| group: ${{ needs.generate-frontend-matrix.outputs.system_group }} | |
| record: ${{ needs.generate-frontend-matrix.outputs.record }} | |
| tag: ${{ needs.generate-frontend-matrix.outputs.tag }} | |
| project: ./tests/System | |
| env: | |
| CYPRESS_PROJECT_ID: ${{ env.CYPRESS_PROJECT_ID }} | |
| CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} | |
| COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha }} | |
| APP_URL: "http://localhost:9080" | |
| TZ: "America/New_York" | |
| ELECTRON_EXTRA_LAUNCH_ARGS: "--lang=en --force-prefers-reduced-motion" | |
| - name: Upload screenshots | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: cypress-screenshots | |
| path: tests/System/screenshots | |
| - name: Upload laravel logs | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: laravel-system-tests.log | |
| path: storage/logs/laravel.log |