-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (46 loc) · 1.71 KB
/
composer.test.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
name: Composer test
on:
push:
branches:
- 'main'
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
databaseImageName: [ 'mariadb:10.5.9', 'mariadb:10.5.12' ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install dependencies
uses: php-actions/composer@v6
with:
php_version: 8.2
command: install
args: --ignore-platform-req=ext-pcntl
- name: Copy example .env file
run: cp .env.example .env
- name: Run docker-compose setup
env:
DATABASE_IMAGE_NAME: ${{ matrix.databaseImageName }}
run: docker compose -f docker-compose.yml -f docker-compose.integration.yml up -d
- name: Setup - Keep trying to install the DBs (try for 30 seconds)
uses: nick-invision/[email protected]
with:
max_attempts: 30
retry_wait_seconds: 1
timeout_seconds: 30
command: docker compose exec -T api php artisan migrate:fresh
- name: Setup - Other things
run: |
docker compose exec -T api php artisan key:generate
- name: PHPUnit
run: docker compose exec -e APP_ENV=testing -T api vendor/bin/phpunit
- name: Psalm
run: docker compose exec -T api vendor/bin/psalm
- name: Run elasticsearch index deletion integration test
run: docker compose exec -e RUN_PHPUNIT_INTEGRATION_TEST=1 -e ELASTICSEARCH_HOST=elasticsearch.svc:9200 -T api vendor/bin/phpunit tests/Jobs/Integration/ElasticSearchIndexDeleteTest.php
- name: Run blazegraph integration test
run: docker compose exec -e RUN_PHPUNIT_INTEGRATION_TEST=1 -T api vendor/bin/phpunit tests/Jobs/Integration/QueryserviceNamespaceJobTest.php