Skip to content

Merge pull request #34 from danskernesdigitalebibliotek/request-memor… #184

Merge pull request #34 from danskernesdigitalebibliotek/request-memor…

Merge pull request #34 from danskernesdigitalebibliotek/request-memor… #184

Workflow file for this run

on: push
name: Build, test, and deploy
jobs:
unit_tests:
name: Unit tests
if: "!github.event.deleted"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@master
with:
php-version: 7.3
tools: composer:v2
# We're using phpdbg, we don't need a coverage extension.
coverage: none
- name: Install Dependencies
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Create Database
run: |
php artisan --no-interaction migrate:fresh
- name: Unit tests
run: phpdbg -qrr ./vendor/bin/phpunit --coverage-clover=coverage/unit.xml
continue-on-error: true
- name: Report coverage to Codecov
run: |
bash <(curl -s https://codecov.io/bash) -F Unit -f coverage/unit.xml
behaviour_tests:
name: Behaviour tests
if: "!github.event.deleted"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@master
with:
php-version: 7.3
tools: composer:v2
coverage: none
- name: Install Dependencies
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Behaviour tests
run: |
phpdbg -qrr vendor/bin/behat
- name: Behaviour test coverage
run: |
phpdbg -qrr vendor/bin/phpcov merge --clover=coverage/behat.xml coverage/default.cov
- name: Report coverage to Codecov
run: |
bash <(curl -s https://codecov.io/bash) -F Behaviour -f coverage/behat.xml
specification_lint:
name: Specification linting
if: "!github.event.deleted"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Lint specification
uses: docker://wework/speccy
with:
args: lint material-list.yaml
specification_tests:
name: Specification tests
if: "!github.event.deleted"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@master
with:
php-version: 7.3
tools: composer:v2
coverage: none
- name: Install Dependencies
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Install Dredd
run: |
npm install dredd@12 --no-optional
- name: Specification tests
run: |
node_modules/.bin/dredd --loglevel=error
env:
ADGANGSPLATFORMEN_DRIVER: testing
DB_CONNECTION: sqlite
DB_DATABASE: /tmp/db.sqlite
CACHE_DRIVER: array
SESSION_DRIVER: array
QUEUE_DRIVER: sync
APP_ENV: testing
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}