-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.08 KB
/
ci.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
on:
pull_request:
push:
branches:
- main
env:
SYMFONY_DEPRECATIONS_HELPER: disabled
name: CI
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.3', '8.4']
container:
image: ghcr.io/city-of-helsinki/drupal-web:${{ matrix.php-versions }}
options: --user 1001
services:
db:
image: mysql:8
env:
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
MYSQL_DATABASE: drupal
MYSQL_ROOT_PASSWORD: drupal
ports:
- 3306:3306
steps:
- uses: actions/checkout@v4
- name: Install required composer dependencies
run: composer install
- name: Run PHPCS
run: vendor/bin/phpcs --ignore=*/vendor/*,*/sut/* .
- name: Run phpstan
run: vendor/bin/phpstan analyze -c phpstan.neon .
- name: Run PHPUnit tests
run:
vendor/bin/phpunit -c tests/phpunit.xml tests/
- uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}