sqrl-test/.gitlab-test.yml

45 lines
1.1 KiB
YAML

test:
stage: test
image: ${CI_REGISTRY}/leenooks/php:8.1-fpm-alpine-test
services:
- postgres:15-alpine
variables:
POSTGRES_PASSWORD: password
POSTGRES_DB: ate
POSTGRES_INITDB_ARGS: "--data-checksums"
tags:
- x86_64
before_script:
- mv .env.testing .env
# Install Composer and project dependencies.
- mkdir -p /root/.config/composer
- if [ -n "$GITHUB_TOKEN" ]; then cat $GITHUB_TOKEN |base64 -d > /root/.config/composer/auth.json ; fi
- composer install
- npm install
- npm run build
# Run database migrations.
- php artisan migrate
# Run database seed
- php artisan db:seed
# Start steno
# php -S localhost:8080 -t public &
# node_modules/steno/bin/./steno --replay --app http://localhost:8080 --out-port 3000 --scenario-dir /tests/steno &
script:
# run laravel tests
- XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-text --colors=never
# run frontend tests
# if you have any task for testing frontend
# set it in your package.json script
# comment this out if you don't have a frontend test
# npm test