diff --git a/.github/workflows/daily-e2e-robotrun.yml b/.github/workflows/daily-e2e-robotrun.yml deleted file mode 100644 index 83e6468a9..000000000 --- a/.github/workflows/daily-e2e-robotrun.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: E2E regression tests -on: - schedule: - - cron: '0 0 * * *' # This cron schedule runs the workflow every day at midnight UTC - workflow_dispatch: - -jobs: - e2e-robot-tests: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Install python dependencies - run: | - python -m pip install --upgrade pip - pip install -r tests/robot_framework/requirements.txt --use-deprecated=legacy-resolver - rfbrowser init - - name: Execute E2E tests (Robot Framework) - env: - OTP_SECRET_WOO: ${{ secrets.OTP_SECRET_WOO }} - USERNAME_WOO_STAGING: ${{ secrets.USERNAME_WOO_STAGING }} - PASSWORD_WOO_STAGING: ${{ secrets.PASSWORD_WOO_STAGING }} - USERNAME_WOO_TEST: ${{ secrets.USERNAME_WOO_TEST }} - PASSWORD_WOO_TEST: ${{ secrets.PASSWORD_WOO_TEST }} - EMAIL_WOO_TEST_BALIE: ${{ secrets.EMAIL_WOO_TEST_BALIE }} - PASSWORD_WOO_TEST_BALIE: ${{ secrets.PASSWORD_WOO_TEST_BALIE }} - SECRET_WOO_TEST_BALIE: ${{ secrets.SECRET_WOO_TEST_BALIE }} - run: | - python -m robot -d tests/robot_framework/results -x outputxunit.xml -i E2E -e LOGS -v headless:true tests/robot_framework - - name: Upload test results - uses: actions/upload-artifact@v3 - if: always() - with: - name: reports - path: tests/robot_framework/results - -# - name: echo environment -# run: echo "Testing on env: ${{ github.event.inputs.env }}" \ No newline at end of file diff --git a/.github/workflows/documentation-linter.yml b/.github/workflows/documentation-linter.yml deleted file mode 100644 index afd178224..000000000 --- a/.github/workflows/documentation-linter.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: lint documentation -on: - pull_request: - paths: - - '**.md' -jobs: - mdlint: - name: lint markDown file - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: DavidAnson/markdownlint-cli2-action@v13 - with: - globs: '**/*.md' - -# https://github.com/DavidAnson/markdownlint diff --git a/.github/workflows/migration-check.yml b/.github/workflows/migration-check.yml deleted file mode 100644 index 194b34e74..000000000 --- a/.github/workflows/migration-check.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: Check for missing migrations - -on: - pull_request: - branches: [ main ] - -jobs: - sync: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - name: Checkout db - uses: actions/checkout@v4 - with: - repository: minvws/nl-rdo-databases - ref: 'main' - token: ${{ secrets.repo_read_only_token }} - path: './database' - - - name: check for missing migrations - id: migration_check - run: | - # Run the script and store the output - set +e - OUT="$(sh .github/scripts/check-missing-migrations.sh)" - RETVAL=$? - set -e - - EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64 | tr -dc 'a-zA-Z0-9') - { - echo "output<<$EOF" - echo "$OUT" - echo "$EOF" - if [[ $RETVAL -eq 1 ]] ; then - echo "missing_migrations=true" - else - echo "missing_migrations=false" - fi - } >> "$GITHUB_OUTPUT" - - - name: debug it - run: | - echo ${{ steps }} - echo $GITHUB_OUTPUT - echo $GITHUB_STATE - - # Find the comment - - name: Find Comment - uses: peter-evans/find-comment@v2 - id: fc - with: - issue-number: ${{ github.event.pull_request.number }} - comment-author: 'github-actions[bot]' - body-includes: Missing Database Migrations - - # Create a comment when migrations are missing in the db repo - - name: Create comment - if: contains(steps.migration_check.outputs.missing_migrations, 'true') - uses: peter-evans/create-or-update-comment@v3 - with: - comment-id: ${{ steps.fc.outputs.comment-id }} - issue-number: ${{ github.event.pull_request.number }} - edit-mode: replace - body: | - ## 🦙🦙 Missing Database Migrations detected - ``` - ${{ steps.migration_check.outputs.output }} - ``` - 👨‍💻 Please run `php bin/console woopie:sql:dump` to create the SQL migrations files, and add them to the database repository to get rid of this message. - - # Remove comment if no missing migrations - - if: ${{ contains(steps.git.outputs.missing_migrations, 'false') && steps.fc.outputs.comment-id != '' }} - uses: actions/github-script@v7 - with: - script: | - github.rest.issues.deleteComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: ${{ steps.fc.outputs.comment-id }} - }) diff --git a/.github/workflows/npm-lint.yml b/.github/workflows/npm-lint.yml deleted file mode 100644 index 7216acc05..000000000 --- a/.github/workflows/npm-lint.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Node - npm run jslint - -on: - push: - branches: [main, develop, release/**, hotfix/**] - pull_request: - branches: [main, develop, release/**, hofix/**] - -jobs: - build: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '18' - cache: 'npm' - registry-url: 'https://npm.pkg.github.com' - - name: Install npm dependencies - run: | - echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc - npm ci --ignore-scripts - env: - NODE_AUTH_TOKEN: ${{ secrets.REPO_READ_ONLY_TOKEN }} - - name: Lint javascript / typescript - run: npm run jslint - - diff --git a/.github/workflows/npm-tests.yml b/.github/workflows/npm-tests.yml deleted file mode 100644 index c6e950a9d..000000000 --- a/.github/workflows/npm-tests.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Node - npm run jest - -on: - push: - branches: [main, develop, release/**, hotfix/**] - pull_request: - branches: [main, develop, release/**, hofix/**] - -jobs: - build: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '18' - cache: 'npm' - registry-url: 'https://npm.pkg.github.com' - - name: Install npm dependencies - run: | - echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc - npm ci --ignore-scripts - env: - NODE_AUTH_TOKEN: ${{ secrets.REPO_READ_ONLY_TOKEN }} - - name: Run unit tests - run: npm test - - diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml deleted file mode 100644 index bcd95db31..000000000 --- a/.github/workflows/package.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Create release package - -on: - push: - tags: - - v* - -jobs: - build: - runs-on: ubuntu-22.04 - steps: - - name: Set env - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - uses: actions/checkout@v4 - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version: '18' - cache: 'npm' - registry-url: 'https://npm.pkg.github.com' - - name: Install npm dependencies - run: | - echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc - npm ci --ignore-scripts - env: - NODE_AUTH_TOKEN: ${{ secrets.REPO_READ_ONLY_TOKEN }} - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: 8.1 - - name: Composer install - env: - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.REPO_READ_ONLY_TOKEN }}"}}' - run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-dev - - name: Run build task - run: npm run build - - name: Clean build - run: | - rm -r node_modules .git var/cache var/log || true - mkdir -p var/log - mkdir -p var/cache - - name: Create version.json - run: | - echo "{ \"version\": \"${{ env.RELEASE_VERSION }}\", \"git_ref\": \"$GITHUB_SHA\"}" > public/version.json - - name: Create tar - run: tar -czf woo-web_${{ env.RELEASE_VERSION }}.tar.gz ./config ./public/ ./src/ ./templates ./translations ./vendor/ ./.db_requirements ./var/cache ./var/log ./worker-*.conf ./bin/console - - name: Upload release tar - uses: actions/upload-artifact@v3 - with: - name: woo-web_${{ env.RELEASE_VERSION }} - path: woo-web_${{ env.RELEASE_VERSION }}.tar.gz diff --git a/.github/workflows/php-tests.yml b/.github/workflows/php-tests.yml deleted file mode 100644 index 3bb1e54b6..000000000 --- a/.github/workflows/php-tests.yml +++ /dev/null @@ -1,218 +0,0 @@ -name: PHP Linting and checks - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - composer-install: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v3 - with: - path: vendor/ - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - extensions: zip - - name: Install Dependencies - env: - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.REPO_READ_ONLY_TOKEN }}"}}' - run: composer install --no-interaction --no-scripts --no-progress --prefer-dist - strategy: - max-parallel: 3 - matrix: - php-versions: [ '8.1', '8.2' ] - - php-linting-psalm: - needs: - - composer-install - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v3 - with: - path: vendor/ - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - - name: Clear cache - run: | - APP_ENV=dev php bin/console cache:clear && APP_ENV=dev php bin/console cache:warmup - ls -laR var/cache - - name: Static analysis with Psalm - run: vendor/bin/psalm - strategy: - max-parallel: 3 - matrix: - php-versions: [ '8.1', '8.2' ] - - php-linting-psr12: - needs: - - composer-install - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v3 - with: - path: vendor/ - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - - name: Coding style PSR12 Check - run: vendor/bin/phpcs - strategy: - max-parallel: 3 - matrix: - php-versions: [ '8.1', '8.2' ] - - php-linting-phpcsfixer: - needs: - - composer-install - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v3 - with: - path: vendor/ - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - - name: PHP CS Fixer - run: vendor/bin/php-cs-fixer fix --dry-run --diff --verbose - strategy: - max-parallel: 3 - matrix: - php-versions: [ '8.1', '8.2' ] - - php-linting-phpmd: - needs: - - composer-install - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v3 - with: - path: vendor/ - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - - name: Mess detection - run: vendor/bin/phpmd src/ text ruleset.phpmd.xml - strategy: - max-parallel: 3 - matrix: - php-versions: [ '8.1', '8.2' ] - - php-linting-stan: - needs: - - composer-install - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v3 - with: - path: vendor/ - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - - name: copy env file - run: | - cp .env.ci .env.local - # change database url to sqlite - sed -i 's|^DATABASE_URL=.*|DATABASE_URL=sqlite:///%kernel.project_dir%/var/data.db|' .env.local - - name: Clear cache - run: APP_ENV=dev php bin/console cache:clear && APP_ENV=dev php bin/console cache:warmup - - name: Static analysis with PHPStan - run: vendor/bin/phpstan analyse - strategy: - max-parallel: 3 - matrix: - php-versions: [ '8.1', '8.2' ] - - php-linting-twig: - needs: - - composer-install - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v3 - with: - path: vendor/ - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - - name: copy env file - run: | - cp .env.ci .env.local - # change database url to sqlite - sed -i 's|^DATABASE_URL=.*|DATABASE_URL=sqlite:///%kernel.project_dir%/var/data.db|' .env.local - - name: Twig linter - run: | - bin/console cache:clear - bin/console cache:warmup - bin/console lint:twig templates - env: - APP_ENV: prod - APP_DEBUG: false - strategy: - max-parallel: 3 - matrix: - php-versions: [ '8.1', '8.2' ] - - php-linting-translations: - needs: - - composer-install - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v3 - with: - path: vendor/ - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - - name: copy env file - run: | - cp .env.ci .env.local - # change database url to sqlite - sed -i 's|^DATABASE_URL=.*|DATABASE_URL=sqlite:///%kernel.project_dir%/var/data.db|' .env.local - - name: Twig linter - run: | - bin/console cache:clear - bin/console cache:warmup - bin/console lint:yaml translations - env: - APP_ENV: prod - APP_DEBUG: false - strategy: - max-parallel: 3 - matrix: - php-versions: [ '8.1', '8.2' ] diff --git a/.github/workflows/robotframeworkci.yml.disabled b/.github/workflows/robotframeworkci.yml.disabled deleted file mode 100644 index 60e07fb7a..000000000 --- a/.github/workflows/robotframeworkci.yml.disabled +++ /dev/null @@ -1,144 +0,0 @@ -name: Robot Framework tests - -on: - pull_request: - branches: [ main ] - -jobs: - composer-install: - runs-on: ubuntu-22.04 - - strategy: - max-parallel: 3 - matrix: - php-versions: [ '8.1' ] - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: vendor/ - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - extensions: zip - - name: Install Dependencies - env: - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.REPO_READ_ONLY_TOKEN }}"}}' - run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist - - robot-tests: - needs: - - composer-install - runs-on: ubuntu-22.04 - - strategy: - max-parallel: 3 - matrix: - php-versions: [ '8.1' ] - services: - postgres: - image: postgres:12.5 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: postgres - ports: - - 5432:5432 - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - redis: - image: redis:latest - ports: - - 6379:6379 - options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 - rabbitmq: - image: rabbitmq:3.9.7-management - env: - RABBITMQ_DEFAULT_USER: guest - RABBITMQ_DEFAULT_PASS: guest - ports: - - 5672:5672 - - 15672:15672 - options: --health-cmd "rabbitmq-diagnostics -q check_running" --health-interval 10s --health-timeout 5s --health-retries 5 - tika: - image: apache/tika:latest - ports: - - 9998:9998 - elasticsearch: - image: elasticsearch:8.2.2 - env: - discovery.type: single-node - cluster.name: elasticsearch - bootstrap.memory_lock: "true" - ES_JAVA_OPTS: "-Xms512m -Xmx512m" - xpack.security.enabled: false - ports: - - 9200:9200 - - 9300:9300 - options: --health-cmd "curl -f http://localhost:9200/_cluster/health?wait_for_status=yellow" --health-interval 10s --health-timeout 5s --health-retries 5 - - steps: - - uses: actions/checkout@v3 - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - extensions: xdebug, pgsql - - uses: actions/cache@v3 - with: - path: vendor/ - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Copy .env - run: cp -n .env.ci .env.local - - name: Execute Generate Database Key - run: | - DBKEY=$(bin/console generate:database-key) - echo DATABASE_ENCRYPTION_KEY=${DBKEY:5} >> .env.local - cat .env.local - - name: Build FE - run: | - echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc - npm ci - npm run build - env: - NODE_AUTH_TOKEN: ${{ secrets.REPO_READ_ONLY_TOKEN }} - - name: Download symfony app - run: | - wget https://get.symfony.com/cli/installer -O - | bash - mv /home/runner/.symfony5/bin/symfony /usr/local/bin/symfony - - name: Migrate and seed database - run: php bin/console d:m:m -n && php bin/console d:f:l -n - - name: Run Symfony Server - run: symfony server:start -d - - - # Robot framework setup - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Install Robot Framework dependencies - run: | - sudo apt-get install --reinstall libpq-dev - python -m pip install --upgrade pip - pip install -r tests/robot_framework/requirements.txt - rfbrowser init - - name: Execute tests (Robot Framework) - run: | - python -m robot -d tests/robot_framework/results -x outputxunit.xml -i CI -v headless:true tests/robot_framework - - name: Upload RF test results - uses: actions/upload-artifact@v3 - if: always() - with: - name: reports - path: tests/robot_framework/results - - - name: Publish Robot Framework test results - uses: EnricoMi/publish-unit-test-result-action/composite@v2 - if: ${{ always() && github.actor != 'dependabot[bot]' }} - with: - junit_files: tests/robot_framework/results/outputxunit.xml - check_name: Robot Framework FE tests diff --git a/.github/workflows/robotframeworkci.yml.stuk b/.github/workflows/robotframeworkci.yml.stuk deleted file mode 100644 index 712ed5794..000000000 --- a/.github/workflows/robotframeworkci.yml.stuk +++ /dev/null @@ -1,144 +0,0 @@ -name: Robot Framework tests - -on: - pull_request: - branches: [ main ] - -jobs: - composer-install: - runs-on: ubuntu-22.04 - - strategy: - max-parallel: 3 - matrix: - php-versions: [ '8.1' ] - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v3 - with: - path: vendor/ - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - extensions: zip - - name: Install Dependencies - env: - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.REPO_READ_ONLY_TOKEN }}"}}' - run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist - - robot-tests: - needs: - - composer-install - runs-on: ubuntu-22.04 - - strategy: - max-parallel: 3 - matrix: - php-versions: [ '8.1' ] - services: - postgres: - image: postgres:12.5 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: postgres - ports: - - 5432:5432 - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - redis: - image: redis:latest - ports: - - 6379:6379 - options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 - rabbitmq: - image: rabbitmq:3.9.7-management - env: - RABBITMQ_DEFAULT_USER: guest - RABBITMQ_DEFAULT_PASS: guest - ports: - - 5672:5672 - - 15672:15672 - options: --health-cmd "rabbitmq-diagnostics -q check_running" --health-interval 10s --health-timeout 5s --health-retries 5 - tika: - image: apache/tika:latest - ports: - - 9998:9998 - elasticsearch: - image: elasticsearch:8.2.2 - env: - discovery.type: single-node - cluster.name: elasticsearch - bootstrap.memory_lock: "true" - ES_JAVA_OPTS: "-Xms512m -Xmx512m" - xpack.security.enabled: false - ports: - - 9200:9200 - - 9300:9300 - options: --health-cmd "curl -f http://localhost:9200/_cluster/health?wait_for_status=yellow" --health-interval 10s --health-timeout 5s --health-retries 5 - - steps: - - uses: actions/checkout@v4 - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - extensions: xdebug, pgsql - - uses: actions/cache@v3 - with: - path: vendor/ - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Copy .env - run: cp -n .env.ci .env.local - - name: Execute Generate Database Key - run: | - DBKEY=$(bin/console generate:database-key) - echo DATABASE_ENCRYPTION_KEY=${DBKEY:5} >> .env.local - cat .env.local - - name: Build FE - run: | - echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc - npm ci - npm run build - env: - NODE_AUTH_TOKEN: ${{ secrets.REPO_READ_ONLY_TOKEN }} - - name: Download symfony app - run: | - wget https://get.symfony.com/cli/installer -O - | bash - mv /home/runner/.symfony5/bin/symfony /usr/local/bin/symfony - - name: Migrate and seed database - run: php bin/console d:m:m -n && php bin/console d:f:l -n - - name: Run Symfony Server - run: symfony server:start -d - - - # Robot framework setup - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Install Robot Framework dependencies - run: | - sudo apt-get install --reinstall libpq-dev - python -m pip install --upgrade pip - pip install -r tests/robot_framework/requirements.txt - rfbrowser init - - name: Execute tests (Robot Framework) - run: | - python -m robot -d tests/robot_framework/results -x outputxunit.xml -i CI -v headless:true tests/robot_framework - - name: Upload RF test results - uses: actions/upload-artifact@v3 - if: always() - with: - name: reports - path: tests/robot_framework/results - - - name: Publish Robot Framework test results - uses: EnricoMi/publish-unit-test-result-action/composite@v2 - if: ${{ always() && github.actor != 'dependabot[bot]' }} - with: - junit_files: tests/robot_framework/results/outputxunit.xml - check_name: Robot Framework FE tests diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml deleted file mode 100644 index 00c06d57f..000000000 --- a/.github/workflows/unit-tests.yml +++ /dev/null @@ -1,112 +0,0 @@ -name: Continuous Integration Tests - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - composer-install: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/cache@v3 - with: - path: vendor/ - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - extensions: zip - - name: Install Dependencies - env: - COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.REPO_READ_ONLY_TOKEN }}"}}' - run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist - strategy: - max-parallel: 3 - matrix: - php-versions: [ '8.1', '8.2' ] - - woopie-unit: - needs: - - composer-install - runs-on: ubuntu-22.04 - strategy: - max-parallel: 3 - matrix: - php-versions: [ '8.1', '8.2' ] - steps: - - uses: actions/checkout@v4 - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - extensions: pgsql, zip, gd - - name: Cache PHP vendor directory - uses: actions/cache@v3 - with: - path: vendor/ - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: use .env.ci - run: cp .env.ci .env.local - - name: Execute tests (Unit and Feature) - run: ./vendor/bin/phpunit --testsuite "Woopie Unit Test Suite" --log-junit=report-unit.xml --coverage-html=./coverage --coverage-clover=coverage.xml -# - name: 'Comment PR' -# uses: actions/github-script@v6 -# if: github.event_name == 'pull_request' -# with: -# github-token: ${{ secrets.GITHUB_TOKEN }} -# debug: true -# script: | -# const script = require('.github/scripts/comment-updater.js'); -# script({github, context, core, filename:"phpunit.out"}); - - - woopie-functional: - needs: - - composer-install - runs-on: ubuntu-20.04 - strategy: - max-parallel: 3 - matrix: - php-versions: [ '8.1', '8.2' ] - services: - postgres: - image: postgres:13 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: ci_db_test - ports: - - 5432:5432 - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - steps: - - uses: actions/checkout@v4 - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - extensions: xdebug, pgsql, zip, gd - - name: Cache PHP vendor directory - uses: actions/cache@v3 - with: - path: vendor/ - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: use .env.ci - run: cp .env.ci .env.local - - name: Execute tests - run: ./vendor/bin/phpunit --testsuite "Woopie Functional Test Suite" --log-junit=report-functional.xml --coverage-html=./coverage --coverage-clover=coverage.xml -# - name: 'Comment PR' -# uses: actions/github-script@v6 -# if: github.event_name == 'pull_request' -# with: -# github-token: ${{ secrets.GITHUB_TOKEN }} -# debug: true -# script: | -# const script = require('.github/scripts/comment-updater.js'); -# script({github, context, core, filename:"phpunit.out"});