From 373ee0250629f0890320e94ea37739761a70032f Mon Sep 17 00:00:00 2001 From: Anne Jan Brouwer Date: Fri, 8 Sep 2023 09:58:51 +0200 Subject: [PATCH] Minor cleanup of tests for public --- .github/workflows/migration-check.yml | 80 -------------- .github/workflows/robotframeworkci.yml | 144 ------------------------- 2 files changed, 224 deletions(-) delete mode 100644 .github/workflows/migration-check.yml delete mode 100644 .github/workflows/robotframeworkci.yml diff --git a/.github/workflows/migration-check.yml b/.github/workflows/migration-check.yml deleted file mode 100644 index 7dd2b9cb..00000000 --- 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@v3 - - name: Checkout db - uses: actions/checkout@v3 - 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@v6 - 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/robotframeworkci.yml b/.github/workflows/robotframeworkci.yml deleted file mode 100644 index 60e07fb7..00000000 --- a/.github/workflows/robotframeworkci.yml +++ /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