Skip to content

Commit 6e7da2a

Browse files
committed
[TASK] Add automatic tests in github actions
1 parent 2d4850f commit 6e7da2a

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

.github/workflows/testing.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: testing
2+
on: [push, pull_request]
3+
4+
jobs:
5+
php-lint:
6+
name: "PHP linter"
7+
runs-on: ubuntu-20.04
8+
steps:
9+
- name: "Checkout"
10+
uses: actions/checkout@v2
11+
- name: "Install PHP"
12+
uses: shivammathur/setup-php@v2
13+
with:
14+
php-version: "${{ matrix.php-version }}"
15+
coverage: none
16+
tools: composer:v2
17+
- name: "Run PHP lint"
18+
run: "composer test:php:lint"
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
php-version:
23+
- 7.2
24+
- 7.3
25+
- 7.4
26+
typoscript-lint:
27+
name: "TypoScript linter"
28+
runs-on: ubuntu-20.04
29+
steps:
30+
- name: "Checkout"
31+
uses: actions/checkout@v2
32+
- name: "Run TypoScript lint"
33+
uses: TYPO3-Continuous-Integration/TYPO3-CI-Typoscript-Lint@v1
34+
with:
35+
files: "./Configuration"
36+
config_file: ".project/tests/typoscript-lint.yml"
37+
php-cs-fixer:
38+
name: "PHP CS Fixer"
39+
runs-on: ubuntu-20.04
40+
needs: php-lint
41+
steps:
42+
- name: "Checkout"
43+
uses: actions/checkout@v2
44+
- name: "Install PHP"
45+
uses: shivammathur/setup-php@v2
46+
with:
47+
php-version: 7.4
48+
- name: "Composer Install"
49+
run: "composer install"
50+
- name: "Run PHP CS Fixer"
51+
run: "composer test:php:cs"
52+
unit-tests:
53+
name: "PHP Unit Tests"
54+
runs-on: ubuntu-20.04
55+
needs: php-lint
56+
steps:
57+
- name: Checkout
58+
uses: actions/checkout@v2
59+
- name: "Install PHP"
60+
uses: shivammathur/setup-php@v2
61+
with:
62+
php-version: "${{ matrix.php-version }}"
63+
coverage: none
64+
tools: composer:v2
65+
- name: "Composer Install"
66+
run: "composer install"
67+
- name: "Run Unit Tests"
68+
run: "composer test:unit"
69+
strategy:
70+
fail-fast: false
71+
matrix:
72+
php-version:
73+
- 7.2
74+
- 7.3
75+
- 7.4

0 commit comments

Comments
 (0)