60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
name: PHP Integration Tests
|
|
|
|
on:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
name: Integration Tests
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
mongo:
|
|
image: mongo:7
|
|
options: >-
|
|
--health-cmd "mongosh --quiet --eval \"db.adminCommand('ping')\""
|
|
--health-interval 5s
|
|
--health-timeout 5s
|
|
--health-retries 12
|
|
|
|
steps:
|
|
- name: Retrieve Server Install Action
|
|
uses: actions/checkout@v6.0.2
|
|
with:
|
|
repository: Nodarx/action-server-install
|
|
ref: main
|
|
path: action-server-install
|
|
github-server-url: https://git.ktrix.dev
|
|
|
|
- name: Install server
|
|
uses: ./action-server-install
|
|
with:
|
|
install-php: 'true'
|
|
php-version: '8.5'
|
|
server-path: './server'
|
|
database-uri: 'mongodb://mongo:27017/?tls=false'
|
|
database-name: 'ktrix_ci'
|
|
app-environment: 'test'
|
|
|
|
- name: Checkout module under test
|
|
uses: actions/checkout@v6.0.2
|
|
with:
|
|
repository: ${{ github.repository }}
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
path: server/modules/provider_jmapc
|
|
github-server-url: https://git.ktrix.dev
|
|
|
|
- name: Install module dependencies
|
|
run: composer install --prefer-dist --no-progress
|
|
working-directory: server/modules/provider_jmapc
|
|
|
|
- name: Install and enable module
|
|
working-directory: server
|
|
run: |
|
|
php bin/console module:install provider_jmapc
|
|
php bin/console module:enable provider_jmapc
|
|
|
|
- name: Run integration tests
|
|
working-directory: server/modules/provider_jmapc
|
|
run: composer test:integration
|