-
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (62 loc) · 2.19 KB
/
Build.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
name: Build
on:
push:
branches: ['*']
pull_request:
branches: ['*']
schedule:
- cron: "0 0 * * 5"
jobs:
PHPUnit:
strategy:
fail-fast: false
matrix:
php_versions: ['7.1', '7.2', '7.3', '7.4']
uf_versions: ['4.3.*', '4.4.*']
runs-on: ubuntu-latest
name: PHPUnit - PHP ${{ matrix.php_versions }} - UF ${{ matrix.uf_versions }}
# env:
# TEST_DB: default
# UF_MODE: debug
# DB_DRIVER: sqlite
# DB_NAME: database/database.sqlite
steps:
- uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
extensions: mbstring, dom, fileinfo, gd, memcached, redis
coverage: xdebug
tools: pecl, composer:v1
- uses: actions/setup-node@v2
with:
node-version: 10
- name: Clone UserFrosting
run: |
cd ../
composer create-project userfrosting/userfrosting UserFrosting ${{ matrix.uf_versions }} --no-install
mv ./UF_MarkdownPages ./UserFrosting/app/sprinkles/MarkdownPages/
mv ./UserFrosting ./UF_MarkdownPages
- name: Setup Sprinkles
run: echo "{\"base\":[\"core\",\"account\",\"admin\",\"Breadcrumb\",\"MarkdownPages\"]}" > ./app/sprinkles.json
- name: Install Dependencies
run: composer install --prefer-dist --no-progress --no-suggest
# - name: Create SQLite Database
# run: |
# mkdir -p database
# touch ${{ DB_NAME }}
# - name: Bakery Debug
# run: php bakery debug
# - name: Migrate DB
# run: php bakery migrate
- name: Build Assets
run: php bakery build-assets
- name: Execute tests
run: app/vendor/bin/phpunit -c app/sprinkles/MarkdownPages/phpunit.xml --coverage-clover=app/sprinkles/MarkdownPages/coverage.xml
- name: Upload coverage to Codecov
if: github.event_name != 'schedule'
uses: codecov/codecov-action@v1
with:
root_dir: ./app/sprinkles/MarkdownPages/
fail_ci_if_error: true