Skip to content

Nigthly Unit Tests Run #1277

Nigthly Unit Tests Run

Nigthly Unit Tests Run #1277

# This is a basic workflow to help you get started with Actions
name: Nigthly Unit Tests Run
on:
schedule:
- cron: '0 0 * * *' # At the end of every day
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "unit-tests"
unit-tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
APP_ENV: testing
APP_DEBUG: true
APP_KEY: base64:4vh0op/S1dAsXKQ2bbdCfWRyCI9r8NNIdPXyZWt9PX4=
DEV_EMAIL_TO: smarcet@gmail.com
APP_URL: http://localhost
DB_CONNECTION: mysql
DB_HOST: 127.0.0.1
DB_PORT: 3306
DB_DATABASE: idp_test
DB_USERNAME: root
DB_PASSWORD: 1qaz2wsx
REDIS_HOST: 127.0.0.1
REDIS_PORT: 6379
REDIS_DB: 0
REDIS_PASSWORD: 1qaz2wsx
REDIS_DATABASES: 16
SSL_ENABLED: false
SESSION_DRIVER: redis
PHP_VERSION: 8.3
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: ${{env.DB_PASSWORD}}
MYSQL_DATABASE: ${{env.DB_DATABASE}}
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Create Redis
uses: supercharge/redis-github-action@1.7.0
with:
redis-port: ${{env.REDIS_PORT}}
redis-password: ${{env.REDIS_PASSWORD}}
# Downloads a copy of the code in your repository before running CI tests
- name: Check out repository code
uses: actions/checkout@v4
- name: Install PHP
uses: "shivammathur/setup-php@v2"
with:
php-version: ${{env.PHP_VERSION}}
extensions: pdo_mysql, mbstring, exif, pcntl, bcmath, sockets, gettext, apcu
- name: Install dependencies
uses: "ramsey/composer-install@v3"
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.PAT }}"} }'
- name: 'Run Tests'
run: |
./update_doctrine.sh
php artisan doctrine:migrations:migrate --no-interaction
php artisan db:seed --force
vendor/bin/phpunit --log-junit results.xml
- name: 'Upload Unit Test Output'
uses: actions/upload-artifact@v4
with:
name: output
path: /output.log
retention-days: 5