-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.64 KB
/
unittests.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
name: unittests
on: [ push, pull_request ]
jobs:
unittests:
name: '[PHP ${{ matrix.php-version }} | DBAL ${{ matrix.dbal-version }}] Unit Tests'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: [ 8.1, 8.2, 8.3 ]
dbal-version: [ 2.13, 3.8 ]
env:
APP_ENV: true
TEST_DIR: test-dir
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite
ini-values: opcache.fast_shutdown=0
- name: Checkout code
uses: actions/checkout@v4
with:
path: ${{ env.TEST_DIR }}/dist/upsert
- name: "Create composer.json"
run: |
echo '{
"name": "netlogix/upsert-test",
"description": "",
"license": "GPL-3.0-or-later",
"require": {
"netlogix/doctrine-upsert": "@dev",
"doctrine/dbal": "^${{ matrix.dbal-version }}"
},
"require-dev": {
"phpunit/phpunit": "^10.5"
},
"repositories": [
{
"type": "path",
"url": "dist/upsert"
}
]
}' > composer.json
working-directory: ${{ env.TEST_DIR }}
- name: "Install project"
run: composer install
working-directory: ${{ env.TEST_DIR }}
- name: Run tests
run: vendor/bin/phpunit -c dist/upsert/phpunit.xml.dist --testsuite="Unit"
working-directory: ${{ env.TEST_DIR }}