-
Notifications
You must be signed in to change notification settings - Fork 38
72 lines (72 loc) · 2.34 KB
/
tests.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
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
env:
PORT_LDAP: 3389
PORT_LDAPS: 6363
LDAP_ADMIN_PASSWORD: ${{ secrets.LDAP_ADMIN_PASSWORD }}
LDAP_LOG_LEVEL: 0
strategy:
matrix:
# operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]
name: Test on ${{ matrix.php-versions }}
steps:
- uses: actions/checkout@v1
- name: Build the docker-compose stack
run: docker-compose -f docker-compose.yml up -d
- name: Check running containers
run: docker ps -a
- name: Check logs
run: docker-compose logs openldap
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ldap
tools: phive
- name: install dependencies
run: composer install
- name: install tools
run: composer require --dev phpunit/phpunit
- name: Run Unit-Tests
run: ./vendor/bin/phpunit --testdox
coverage:
needs: test
runs-on: ubuntu-latest
env:
PORT_LDAP: 3389
PORT_LDAPS: 6363
LDAP_ADMIN_PASSWORD: ${{ secrets.LDAP_ADMIN_PASSWORD }}
LDAP_LOG_LEVEL: 0
continue-on-error: false
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build the docker-compose stack
run: docker-compose -f docker-compose.yml up -d
- name: Check running containers
run: docker ps -a
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
coverage: xdebug
tools: phive
- name: install dependencies
run: composer install
- name: install tools
run: phive install --trust-gpg-keys 4AA394086372C20A phpunit
- name: run testsuite
run: ./tools/phpunit --testdox --colors=always --coverage-clover clover.xml
- name: upload to codecov
uses: codecov/codecov-action@v1
with:
#token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./clover.xml # optional
#flags: unittests # optional
#name: codecov-umbrella # optional
#fail_ci_if_error: true # optional (default = false)
#verbose: true # optional (default = false)