Skip to content

QIT Environment Test - Linux #180

QIT Environment Test - Linux

QIT Environment Test - Linux #180

name: QIT Self-Tests - Custom Tests
on:
# Every day at 11pm UTC (6pm ET)
schedule:
- cron: '0 23 * * *'
# Manually
workflow_dispatch:
jobs:
self_test_custom_test:
runs-on: ubuntu-20.04
env:
NO_COLOR: 1
QIT_DISABLE_ONBOARDING: yes
QIT_DISABLE_CLEANUP: 1
QIT_SELF_TESTS: 1
steps:
- name: Checkout code (Cross-platform)
uses: actions/checkout@v4
- name: Create tmp directory on the workspace.
run: mkdir -p ${{ github.workspace }}/tmp
- name: Setup PHP (Cross-platform)
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
ini-values: sys_temp_dir=${{ github.workspace }}/tmp
- name: Composer install
working-directory: _tests/custom_tests
run: composer install
- name: Fill in .env
working-directory: _tests/custom_tests
run: |
echo 'QIT_CUSTOM_TESTS_USER="noop"' >> .env
echo 'QIT_CUSTOM_TESTS_USER_QIT_TOKEN="noop"' >> .env
echo 'QIT_CUSTOM_TESTS_SECRET="${{ secrets.QIT_STAGING_SECRET }}"' >> .env
echo 'QIT_CUSTOM_TESTS_URL="https://stagingcompatibilitydashboard.wpcomstaging.com/"' >> .env
echo 'QIT_CUSTOM_TESTS_ENV="staging"' >> .env
- name: Run tests in parallel
working-directory: _tests/custom_tests
run: ./vendor/bin/phpunit