mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-20 03:38:06 +02:00
Try using sqlite with filesystem on travis
This commit is contained in:
parent
1c9c6f2703
commit
41aedb9d7b
46
.github/workflows/phpunit.yml
vendored
46
.github/workflows/phpunit.yml
vendored
@ -1,46 +0,0 @@
|
|||||||
# name: phpunit
|
|
||||||
# on:
|
|
||||||
# push:
|
|
||||||
# branches:
|
|
||||||
# - dev
|
|
||||||
# paths:
|
|
||||||
# - .github/workflows/phpunit.yml
|
|
||||||
# - app/**
|
|
||||||
# - bootstrap/**
|
|
||||||
# - config/**
|
|
||||||
# - database/**
|
|
||||||
# - docker/**
|
|
||||||
# - public/**
|
|
||||||
# - resources/**
|
|
||||||
# - routes/**
|
|
||||||
# - storage/**
|
|
||||||
# - tests/**
|
|
||||||
# - .dockerignore
|
|
||||||
# - .env.travis
|
|
||||||
# - artisan
|
|
||||||
# - composer.json
|
|
||||||
# - composer.lock
|
|
||||||
# - Dockerfile
|
|
||||||
# - phpunit.xml
|
|
||||||
# - server.php
|
|
||||||
|
|
||||||
# jobs:
|
|
||||||
# tests:
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v2
|
|
||||||
|
|
||||||
# - name: Install dependencies
|
|
||||||
# uses: php-actions/composer@v6
|
|
||||||
# with:
|
|
||||||
# php_version: 7.4
|
|
||||||
# dev: no
|
|
||||||
|
|
||||||
# - name: Run PHPUnit tests
|
|
||||||
# uses: php-actions/phpunit@v3
|
|
||||||
# with:
|
|
||||||
# php_version: 7.4
|
|
||||||
# version: 9.5
|
|
||||||
# bootstrap: vendor/autoload.php
|
|
||||||
# configuration: phpunit.xml
|
|
@ -22,9 +22,10 @@ before_script:
|
|||||||
script:
|
script:
|
||||||
# - DATABASE=mysql vendor/bin/phpunit -c phpunit-mysql.xml
|
# - DATABASE=mysql vendor/bin/phpunit -c phpunit-mysql.xml
|
||||||
- cp .env.travis .env
|
- cp .env.travis .env
|
||||||
|
- touch database/database.sqlite
|
||||||
- php artisan config:clear
|
- php artisan config:clear
|
||||||
- php artisan key:generate
|
- php artisan key:generate
|
||||||
- DATABASE=sqlite vendor/bin/phpunit -c phpunit.xml --coverage-clover=coverage.xml
|
- DATABASE=sqlite vendor/bin/phpunit -c phpunit-travis-sqlite.xml --coverage-clover=coverage.xml
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
# Submit coverage report to https://codecov.io
|
# Submit coverage report to https://codecov.io
|
||||||
|
37
phpunit-travis-sqlite.xml
Normal file
37
phpunit-travis-sqlite.xml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
bootstrap="vendor/autoload.php"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false"
|
||||||
|
stopOnError="false"
|
||||||
|
beStrictAboutTestsThatDoNotTestAnything="false"
|
||||||
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
|
||||||
|
<coverage processUncoveredFiles="true">
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">./app</directory>
|
||||||
|
</include>
|
||||||
|
</coverage>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Unit">
|
||||||
|
<directory suffix="Test.php">./tests/Unit</directory>
|
||||||
|
</testsuite>
|
||||||
|
<testsuite name="Feature">
|
||||||
|
<directory suffix="Test.php">./tests/Feature</directory>
|
||||||
|
</testsuite>
|
||||||
|
<testsuite name="Api.v1">
|
||||||
|
<directory suffix="Test.php">./tests/Api/v1</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
<php>
|
||||||
|
<env name="APP_ENV" value="testing"/>
|
||||||
|
<!-- following values override .env.testing vars -->
|
||||||
|
<env name="DB_CONNECTION" value="sqlite"/>
|
||||||
|
<env name="DB_DATABASE" value="./database/database.sqlite"/>
|
||||||
|
</php>
|
||||||
|
</phpunit>
|
Loading…
x
Reference in New Issue
Block a user