-
Notifications
You must be signed in to change notification settings - Fork 63
66 lines (50 loc) · 1.61 KB
/
continuous-integration.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
name: "Website build"
on: ["push", "pull_request"]
env:
doctrine_website_github_http_token: "${{ github.token }}"
PHP_VERSION: "7.4"
doctrine_website_mysql_password: "${{ secrets.doctrine_website_mysql_password }}"
doctrine_website_algolia_admin_api_key: "no-key-needed"
jobs:
tests:
runs-on: "ubuntu-latest"
services:
mysql:
image: "mysql:5.7"
env:
MYSQL_DATABASE: "doctrine_website_test"
MYSQL_ROOT_PASSWORD: "${{ secrets.doctrine_website_mysql_password }}"
ports:
- "3306:3306"
steps:
- uses: "actions/checkout@v2"
- name: "Setup PHP Action"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ env.PHP_VERSION }}"
coverage: "none"
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
with:
composer-options: "--prefer-dist --no-progress --no-suggest"
- name: "Installation of node"
uses: "actions/setup-node@v2"
with:
node-version: '10.22.0'
- name: "yarn install"
run: "yarn install"
- name: "Run tests"
run: "./vendor/bin/phpunit"
- name: "Setup PHP Action"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ env.PHP_VERSION }}"
coverage: "pcov"
- name: "Build website"
run: "./bin/console --env=test build-all"
- name: "Run PHP tests with coverage"
run: "./vendor/bin/phpunit --coverage-clover clover.xml"
- name: "Run JS tests"
run: "yarn jest"
- name: "Deliver code coverage"
run: "bash <(curl -s https://codecov.io/bash)"