Skip to content
This repository has been archived by the owner on Nov 12, 2023. It is now read-only.

Add no maintenance badge. #383

Add no maintenance badge.

Add no maintenance badge. #383

Workflow file for this run

name: Symfony-CI
# base info created from https://github.com/jzohrab/lute/actions/new, Symfony.
# then edited until tests are run and passing.
on:
push:
branches: [ "develop", "master", "fix_github_ci_windows" ]
pull_request:
branches: [ "develop", "master" ]
permissions:
contents: read
jobs:
symfony-tests:
runs-on: ubuntu-latest
steps:
# To automatically get bug fixes and new Php versions for shivammathur/setup-php,
# change this to (see https://github.com/shivammathur/setup-php#bookmark-versioning):
# uses: shivammathur/setup-php@v2
- uses: shivammathur/setup-php@2cb9b829437ee246e9b3cac53555a39208ca6d28
with:
php-version: '8.1'
- uses: actions/checkout@v3
# "dump()" appears to cause problems in prod,
# and "echo" might print bad things to the user's screen.
- name: Prevent debug cruft
run: composer dev:finddump
- name: Copy .env.test
run: php -r "file_exists('.env.test') || copy('.env.test.example', '.env.test');"
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install Dependencies
run: |
composer install --no-progress
sudo apt-get update -y
sudo apt-get install -y mecab mecab-ipadic-utf8
- name: Make var dir so psalm config is valid.
run: mkdir -p var
- name: Psalm check
run: ./vendor/bin/psalm --config=psalm.xml --no-progress
- name: Setup testing db
run: composer db:create:test
- name: Run src only tests
run: composer test:src
- name: Run acceptance tests
run: composer test:accept
windows-no-mecab-tests:
runs-on: windows-latest
steps:
# To automatically get bug fixes and new Php versions for shivammathur/setup-php,
# change this to (see https://github.com/shivammathur/setup-php#bookmark-versioning):
# uses: shivammathur/setup-php@v2
- uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: zip,pdo_sqlite,sqlite3
- name: Install sqlite
run: choco install sqlite
- uses: actions/checkout@v3
- name: Copy .env.test
run: php -r "file_exists('.env.test') || copy('.env.test.example', '.env.test');"
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Windows file hack
run: |
'DB_WINDOWS_REPLACE_TRIPLE_SLASH=yes' >> .env
'DB_WINDOWS_REPLACE_TRIPLE_SLASH=yes' >> .env.test
- name: Validate windows file hack
run: |
Get-Content -Path .env
Get-Content -Path .env.test
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install Dependencies (no mecab)
run: |
composer update
composer install --no-progress
- name: Setup testing db
run: php db/create_no_check.php
# - name: Debugging, list directory contents
# run: |
# dir
# dir bin
# dir vendor\bin
# shell: cmd
# - name: Debugging, show phpunit options
# run: vendor\bin\phpunit --help
# shell: cmd
# Don't use "composer test:src" etc, because that sets various flags
# like PANTHER_NO_HEADLESS as part of the script call,
# which isn't valid in windows
- name: Run no-mecab unit tests
run: |
set SYMFONY_DEPRECATIONS_HELPER=disabled
vendor\bin\phpunit -v -c phpunit.xml.dist tests\src
shell: cmd
- name: Run no-mecab acceptance tests
run: |
set SYMFONY_DEPRECATIONS_HELPER=disabled
vendor\bin\phpunit -v -c phpunit.xml.dist tests\acceptance
shell: cmd