Skip to content

tec: Fix the building of the Docker image #1473

tec: Fix the building of the Docker image

tec: Fix the building of the Docker image #1473

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
- 'feat/**'
pull_request:
branches:
- main
- 'feat/**'
env:
NO_DOCKER: true
COVERAGE: --coverage-text
LDAP_HOST: localhost
jobs:
postgresql:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-22.04]
php-versions: ['8.2', '8.3']
services:
postgres:
image: postgres:12-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: bileto_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
name: Tests over PostgreSQL 12
steps:
- uses: actions/checkout@v3
- name: Setup the CI
uses: ./.github/actions/setup
with:
php-version: ${{ matrix.php-versions }}
- name: Start OpenLDAP server
run: |
# The server cannot be run as a normal service because it
# wouldn't have access to the docker/development/ldap-ldifs/ folder.
docker run -d \
-p "1389:1389" \
-v ${{ github.workspace }}/docker/development/ldap-ldifs:/ldifs \
-e LDAP_ROOT="dc=example,dc=com" \
-e LDAP_ADMIN_USERNAME=admin \
-e LDAP_ADMIN_PASSWORD=secret \
-e BITNAMI_DEBUG=true \
bitnami/openldap:2
- name: Run the test suite
run: make test
env:
DATABASE_URL: "postgresql://postgres:[email protected]:5432/bileto?serverVersion=12&charset=utf8"
mariadb:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-22.04]
php-versions: ['8.2', '8.3']
services:
mariadb:
image: mariadb:10.4
ports:
- 3306:3306
env:
MARIADB_ROOT_PASSWORD: mariadb
MARIADB_DATABASE: bileto_test
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=5
name: Tests over MariaDB 10.4
steps:
- uses: actions/checkout@v3
- name: Setup the CI
uses: ./.github/actions/setup
with:
php-version: ${{ matrix.php-versions }}
- name: Start OpenLDAP server
run: |
# The server cannot be run as a normal service because it
# wouldn't have access to the docker/development/ldap-ldifs/ folder.
docker run -d \
-p "1389:1389" \
-v ${{ github.workspace }}/docker/development/ldap-ldifs:/ldifs \
-e LDAP_ROOT="dc=example,dc=com" \
-e LDAP_ADMIN_USERNAME=admin \
-e LDAP_ADMIN_PASSWORD=secret \
-e BITNAMI_DEBUG=true \
bitnami/openldap:2
- name: Run the test suite
run: make test
env:
DATABASE_URL: 'mysql://root:[email protected]:3306/bileto?serverVersion=10.4.29-MariaDB'