Skip to content

dev: Reorganize the env files #642

dev: Reorganize the env files

dev: Reorganize the env files #642

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.1', '8.2']
services:
postgres:
image: postgres:11-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
name: Tests over PostgreSQL 11
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/ldap-ldifs/ folder.
docker run -d \
-p "1389:1389" \
-v ${{ github.workspace }}/docker/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=11&charset=utf8"
mariadb:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-22.04]
php-versions: ['8.1', '8.2']
services:
mariadb:
image: mariadb:10.4
ports:
- 3306:3306
env:
MARIADB_ROOT_PASSWORD: mariadb
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/ldap-ldifs/ folder.
docker run -d \
-p "1389:1389" \
-v ${{ github.workspace }}/docker/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'