-
Notifications
You must be signed in to change notification settings - Fork 1
95 lines (92 loc) · 3.01 KB
/
push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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 }}