Debug github actions... #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: [push] | |
jobs: | |
php-unit-and-functional-tests: | |
runs-on: ubuntu-20.04 | |
# Docs: https://docs.github.com/en/actions/using-containerized-services | |
services: | |
postgres: | |
image: postgres:15 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
ports: | |
- 5432/tcp | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3 | |
strategy: | |
fail-fast: true | |
matrix: | |
php-versions: ['8.2'] | |
steps: | |
# —— Setup GitHub actions ————————————————————————————————————————————— | |
# https://github.com/actions/checkout (official) | |
- name: Git checkout placeholder-service | |
uses: actions/checkout@v3 | |
# https://github.com/shivammathur/setup-php (community) | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: none | |
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, dom, filter, gd, iconv, json, mbstring, pdo | |
env: | |
update: true | |
- name: Check PHP Version | |
run: php -v | |
# —— Composer ————————————————————————————————————————————————————————— | |
- name: Install dependencies | |
uses: php-actions/composer@v6 | |
# —— Symfony —————————————————————————————————————————————————————————— | |
# - name: Check Symfony requirements | |
# run: vendor/bin/requirements-checker | |
- name: Check the Symfony console | |
run: bin/console -V | |
# —— Code style —— (Based on this package: https://github.com/OskarStark/php-cs-fixer-ga) | |
# - name: PHP-CS-Fixer | |
# uses: docker://oskarstark/php-cs-fixer-ga | |
# with: | |
# args: --config=.php_cs.dist --diff --dry-run | |
# - name: Cache node_modules | |
# uses: actions/cache@v1 | |
# id: yarn-cache-node-modules | |
# with: | |
# path: node_modules | |
# key: ${{ runner.os }}-yarn-cache-node-modules-${{ hashFiles('**/yarn.lock') }} | |
# restore-keys: | | |
# ${{ runner.os }}-yarn-cache-node-modules- | |
#- name: Yarn install | |
# if: steps.yarn-cache-node-modules.outputs.cache-hit != 'true' | |
#run: yarn install | |
#- name: Yarn build | |
# run: yarn run encore production | |
- name: Install assets | |
run: bin/console importmap:install | |
## —— Tests ——————————————————————————————————————————————————————————— | |
- name: Run functional and unit tests | |
run: make citests | |
env: | |
DATABASE_URL: postgres://postgres:[email protected]:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8 | |
- name: Output log files | |
run: ls /var/log/apache2/ | |
- name: aaa | |
run: cat /var/log/apache2/error.log |