Files
wallabag-mirror/.github/workflows/continuous-integration.yml
2026-10-13 08:32:45 +02:00

746 lines
28 KiB
YAML

name: "CI"
on:
pull_request:
push:
branches:
- master
- "2.**"
env:
# Force disabling the reporting of Doctrine deprecation notices for now
DOCTRINE_DEPRECATIONS: none
# Keep this in sync with phpunit.xml.dist if the base Symfony deprecation policy changes.
WALLABAG_SYMFONY_DEPRECATIONS_HELPER_BASE: "max[self]=0&max[direct]=0&quiet[]=other"
PGPASSWORD: wallabagrocks
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: read
jobs:
phpunit:
name: "PHP ${{ matrix.php }} using ${{ matrix.database }}"
runs-on: ubuntu-latest
env:
DATABASE_URL: >-
${{ matrix.database == 'mysql' && 'mysql://root:root@127.0.0.1:3306/wallabag?charset=utf8mb4'
|| matrix.database == 'pgsql' && 'postgresql://wallabag:wallabagrocks@127.0.0.1:5432/wallabag?charset=utf8'
|| format('sqlite:///{0}/data/db/wallabag_test.sqlite', github.workspace) }}
services:
rabbitmq:
image: rabbitmq:3-alpine
ports:
- 5672:5672
redis:
image: redis:6-alpine
ports:
- 6379:6379
strategy:
fail-fast: false
matrix:
php:
- "8.2"
- "8.3"
- "8.4"
database:
- "sqlite"
- "mysql"
- "pgsql"
steps:
- name: "Checkout"
uses: "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1" # v7.0.1
with:
fetch-depth: 2
- name: "Install PHP"
uses: "shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962" # 2.40.0
with:
php-version: "${{ matrix.php }}"
coverage: pcov
tools: pecl
extensions: json, pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy
ini-values: "date.timezone=Europe/Paris"
- name: "Install Node"
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: ".nvmrc"
cache: 'yarn'
- name: "Setup MySQL"
if: "${{ matrix.database == 'mysql' }}"
run: |
sudo systemctl start mysql.service
sudo mysql -u root -proot -h 127.0.0.1 -e "CREATE DATABASE wallabag_test"
- name: "Setup PostgreSQL"
if: "${{ matrix.database == 'pgsql' }}"
run: |
sudo systemctl start postgresql
sudo -u postgres psql -d template1 -c "CREATE USER wallabag WITH PASSWORD 'wallabagrocks' CREATEDB"
createdb -h localhost -p 5432 -U wallabag wallabag_test
pg_isready -d wallabag_test -h localhost -p 5432 -U wallabag
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # 4.0.0
with:
composer-options: "--optimize-autoloader --prefer-dist"
- name: "Install dependencies with Yarn"
run: yarn install
- name: "Build assets with Yarn"
run: yarn build:dev
- name: "Prepare coverage output directory"
run: mkdir -p .coverage
- name: "Run PHPUnit unit tests"
env:
SYMFONY_DEPRECATIONS_HELPER: "${{ env.WALLABAG_SYMFONY_DEPRECATIONS_HELPER_BASE }}&logFile=${{ runner.temp }}/wallabag-phpunit-unit.deprecations.log"
run: "php bin/phpunit --testsuite unit -v --coverage-clover=.coverage/unit.xml --log-junit=.coverage/unit.junit.xml"
- name: "Display PHPUnit unit Symfony deprecations"
if: ${{ !cancelled() }}
run: |
deprecations_log="${{ runner.temp }}/wallabag-phpunit-unit.deprecations.log"
if [ ! -e "$deprecations_log" ]; then
echo "No Symfony deprecations log was generated for the unit suite."
exit 0
fi
if [ ! -s "$deprecations_log" ]; then
echo "Symfony deprecations log for the unit suite is empty."
exit 0
fi
echo "Symfony deprecations for the unit suite:"
cat "$deprecations_log"
- name: "Upload unit coverage to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
files: ".coverage/unit.xml"
flags: "unit"
name: "phpunit-unit-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
- name: "Upload unit test results to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
report_type: "test_results"
files: ".coverage/unit.junit.xml"
flags: "unit,php-${{ matrix.php }},db-${{ matrix.database }},run-default"
name: "phpunit-test-results-unit-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
- name: "Run PHPUnit integration tests"
if: ${{ !cancelled() }}
env:
SYMFONY_DEPRECATIONS_HELPER: "${{ env.WALLABAG_SYMFONY_DEPRECATIONS_HELPER_BASE }}&logFile=${{ runner.temp }}/wallabag-phpunit-integration.deprecations.log"
run: "php bin/phpunit --testsuite integration -v --coverage-clover=.coverage/integration.xml --log-junit=.coverage/integration.junit.xml"
- name: "Display PHPUnit integration Symfony deprecations"
if: ${{ !cancelled() }}
run: |
deprecations_log="${{ runner.temp }}/wallabag-phpunit-integration.deprecations.log"
if [ ! -e "$deprecations_log" ]; then
echo "No Symfony deprecations log was generated for the integration suite."
exit 0
fi
if [ ! -s "$deprecations_log" ]; then
echo "Symfony deprecations log for the integration suite is empty."
exit 0
fi
echo "Symfony deprecations for the integration suite:"
cat "$deprecations_log"
- name: "Upload integration coverage to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
files: ".coverage/integration.xml"
flags: "integration"
name: "phpunit-integration-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
- name: "Upload integration test results to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
report_type: "test_results"
files: ".coverage/integration.junit.xml"
flags: "integration,php-${{ matrix.php }},db-${{ matrix.database }},run-default"
name: "phpunit-test-results-integration-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
- name: "Run PHPUnit functional tests"
if: ${{ !cancelled() }}
env:
SYMFONY_DEPRECATIONS_HELPER: "${{ env.WALLABAG_SYMFONY_DEPRECATIONS_HELPER_BASE }}&logFile=${{ runner.temp }}/wallabag-phpunit-functional.deprecations.log"
run: "php bin/phpunit --testsuite functional -v --coverage-clover=.coverage/functional.xml --log-junit=.coverage/functional.junit.xml"
- name: "Display PHPUnit functional Symfony deprecations"
if: ${{ !cancelled() }}
run: |
deprecations_log="${{ runner.temp }}/wallabag-phpunit-functional.deprecations.log"
if [ ! -e "$deprecations_log" ]; then
echo "No Symfony deprecations log was generated for the functional suite."
exit 0
fi
if [ ! -s "$deprecations_log" ]; then
echo "Symfony deprecations log for the functional suite is empty."
exit 0
fi
echo "Symfony deprecations for the functional suite:"
cat "$deprecations_log"
- name: "Upload functional coverage to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
files: ".coverage/functional.xml"
flags: "functional"
name: "phpunit-functional-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
- name: "Upload functional test results to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
report_type: "test_results"
files: ".coverage/functional.junit.xml"
flags: "functional,php-${{ matrix.php }},db-${{ matrix.database }},run-default"
name: "phpunit-test-results-functional-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
phpunit_no_prefix:
name: "PHP ${{ matrix.php }} using ${{ matrix.database }} without prefix"
runs-on: ubuntu-latest
env:
DATABASE_URL: >-
${{ matrix.database == 'mysql' && 'mysql://root:root@127.0.0.1:3306/wallabag?charset=utf8mb4'
|| matrix.database == 'pgsql' && 'postgresql://wallabag:wallabagrocks@127.0.0.1:5432/wallabag?charset=utf8'
|| format('sqlite:///{0}/data/db/wallabag_test.sqlite', github.workspace) }}
WALLABAG_TABLE_PREFIX: ""
services:
rabbitmq:
image: rabbitmq:3-alpine
ports:
- 5672:5672
redis:
image: redis:6-alpine
ports:
- 6379:6379
strategy:
fail-fast: false
matrix:
php:
- "8.2"
database:
- "sqlite"
- "mysql"
- "pgsql"
steps:
- name: "Checkout"
uses: "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1" # v7.0.1
with:
fetch-depth: 2
- name: "Install PHP"
uses: "shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962" # 2.40.0
with:
php-version: "${{ matrix.php }}"
coverage: pcov
tools: pecl
extensions: json, pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy
ini-values: "date.timezone=Europe/Paris"
- name: "Install Node"
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: ".nvmrc"
cache: 'yarn'
- name: "Setup MySQL"
if: "${{ matrix.database == 'mysql' }}"
run: |
sudo systemctl start mysql.service
sudo mysql -u root -proot -h 127.0.0.1 -e "CREATE DATABASE wallabag_test"
- name: "Setup PostgreSQL"
if: "${{ matrix.database == 'pgsql' }}"
run: |
sudo systemctl start postgresql
sudo -u postgres psql -d template1 -c "CREATE USER wallabag WITH PASSWORD 'wallabagrocks' CREATEDB"
createdb -h localhost -p 5432 -U wallabag wallabag_test
pg_isready -d wallabag_test -h localhost -p 5432 -U wallabag
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # 4.0.0
with:
composer-options: "--optimize-autoloader --prefer-dist"
- name: "Install dependencies with Yarn"
run: yarn install
- name: "Build assets with Yarn"
run: yarn build:dev
- name: "Prepare coverage output directory"
run: mkdir -p .coverage
- name: "Run PHPUnit unit tests"
env:
SYMFONY_DEPRECATIONS_HELPER: "${{ env.WALLABAG_SYMFONY_DEPRECATIONS_HELPER_BASE }}&logFile=${{ runner.temp }}/wallabag-phpunit-unit.deprecations.log"
run: "php bin/phpunit --testsuite unit -v --coverage-clover=.coverage/unit.xml --log-junit=.coverage/unit.junit.xml"
- name: "Display PHPUnit unit Symfony deprecations"
if: ${{ !cancelled() }}
run: |
deprecations_log="${{ runner.temp }}/wallabag-phpunit-unit.deprecations.log"
if [ ! -e "$deprecations_log" ]; then
echo "No Symfony deprecations log was generated for the unit suite."
exit 0
fi
if [ ! -s "$deprecations_log" ]; then
echo "Symfony deprecations log for the unit suite is empty."
exit 0
fi
echo "Symfony deprecations for the unit suite:"
cat "$deprecations_log"
- name: "Upload unit coverage to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
files: ".coverage/unit.xml"
flags: "unit"
name: "phpunit-no-prefix-unit-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
- name: "Upload unit test results to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
report_type: "test_results"
files: ".coverage/unit.junit.xml"
flags: "unit,php-${{ matrix.php }},db-${{ matrix.database }},run-no-prefix"
name: "phpunit-no-prefix-test-results-unit-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
- name: "Run PHPUnit integration tests"
if: ${{ !cancelled() }}
env:
SYMFONY_DEPRECATIONS_HELPER: "${{ env.WALLABAG_SYMFONY_DEPRECATIONS_HELPER_BASE }}&logFile=${{ runner.temp }}/wallabag-phpunit-integration.deprecations.log"
run: "php bin/phpunit --testsuite integration -v --coverage-clover=.coverage/integration.xml --log-junit=.coverage/integration.junit.xml"
- name: "Display PHPUnit integration Symfony deprecations"
if: ${{ !cancelled() }}
run: |
deprecations_log="${{ runner.temp }}/wallabag-phpunit-integration.deprecations.log"
if [ ! -e "$deprecations_log" ]; then
echo "No Symfony deprecations log was generated for the integration suite."
exit 0
fi
if [ ! -s "$deprecations_log" ]; then
echo "Symfony deprecations log for the integration suite is empty."
exit 0
fi
echo "Symfony deprecations for the integration suite:"
cat "$deprecations_log"
- name: "Upload integration coverage to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
files: ".coverage/integration.xml"
flags: "integration"
name: "phpunit-no-prefix-integration-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
- name: "Upload integration test results to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
report_type: "test_results"
files: ".coverage/integration.junit.xml"
flags: "integration,php-${{ matrix.php }},db-${{ matrix.database }},run-no-prefix"
name: "phpunit-no-prefix-test-results-integration-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
- name: "Run PHPUnit functional tests"
if: ${{ !cancelled() }}
env:
SYMFONY_DEPRECATIONS_HELPER: "${{ env.WALLABAG_SYMFONY_DEPRECATIONS_HELPER_BASE }}&logFile=${{ runner.temp }}/wallabag-phpunit-functional.deprecations.log"
run: "php bin/phpunit --testsuite functional -v --coverage-clover=.coverage/functional.xml --log-junit=.coverage/functional.junit.xml"
- name: "Display PHPUnit functional Symfony deprecations"
if: ${{ !cancelled() }}
run: |
deprecations_log="${{ runner.temp }}/wallabag-phpunit-functional.deprecations.log"
if [ ! -e "$deprecations_log" ]; then
echo "No Symfony deprecations log was generated for the functional suite."
exit 0
fi
if [ ! -s "$deprecations_log" ]; then
echo "Symfony deprecations log for the functional suite is empty."
exit 0
fi
echo "Symfony deprecations for the functional suite:"
cat "$deprecations_log"
- name: "Upload functional coverage to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
files: ".coverage/functional.xml"
flags: "functional"
name: "phpunit-no-prefix-functional-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
- name: "Upload functional test results to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
report_type: "test_results"
files: ".coverage/functional.junit.xml"
flags: "functional,php-${{ matrix.php }},db-${{ matrix.database }},run-no-prefix"
name: "phpunit-no-prefix-test-results-functional-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
phpunit-without-rmq-redis:
name: "PHP ${{ matrix.php }} using ${{ matrix.database }} without Rabbit & Redis"
runs-on: ubuntu-latest
env:
DATABASE_URL: >-
${{ matrix.database == 'mysql' && 'mysql://root:root@127.0.0.1:3306/wallabag?charset=utf8mb4'
|| matrix.database == 'pgsql' && 'postgresql://wallabag:wallabagrocks@127.0.0.1:5432/wallabag?charset=utf8'
|| format('sqlite:///{0}/data/db/wallabag_test.sqlite', github.workspace) }}
strategy:
fail-fast: false
matrix:
php:
- "8.3"
database:
- "sqlite"
- "mysql"
- "pgsql"
steps:
- name: "Checkout"
uses: "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1" # v7.0.1
with:
fetch-depth: 2
- name: "Install PHP"
uses: "shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962" # 2.40.0
with:
php-version: "${{ matrix.php }}"
coverage: pcov
tools: pecl
extensions: json, pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy
ini-values: "date.timezone=Europe/Paris"
- name: "Install Node"
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: ".nvmrc"
cache: 'yarn'
- name: "Setup MySQL"
if: "${{ matrix.database == 'mysql' }}"
run: |
sudo systemctl start mysql.service
sudo mysql -u root -proot -h 127.0.0.1 -e "CREATE DATABASE wallabag_test"
- name: "Setup PostgreSQL"
if: "${{ matrix.database == 'pgsql' }}"
run: |
sudo systemctl start postgresql
sudo -u postgres psql -d template1 -c "CREATE USER wallabag WITH PASSWORD 'wallabagrocks' CREATEDB"
createdb -h localhost -p 5432 -U wallabag wallabag_test
pg_isready -d wallabag_test -h localhost -p 5432 -U wallabag
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # 4.0.0
with:
composer-options: "--optimize-autoloader --prefer-dist"
- name: "Install dependencies with Yarn"
run: yarn install
- name: "Build assets with Yarn"
run: yarn build:dev
- name: "Prepare coverage output directory"
run: mkdir -p .coverage
- name: "Run PHPUnit unit tests"
env:
SYMFONY_DEPRECATIONS_HELPER: "${{ env.WALLABAG_SYMFONY_DEPRECATIONS_HELPER_BASE }}&logFile=${{ runner.temp }}/wallabag-phpunit-unit.deprecations.log"
run: "php bin/phpunit --testsuite unit -v --coverage-clover=.coverage/unit.xml --log-junit=.coverage/unit.junit.xml"
- name: "Display PHPUnit unit Symfony deprecations"
if: ${{ !cancelled() }}
run: |
deprecations_log="${{ runner.temp }}/wallabag-phpunit-unit.deprecations.log"
if [ ! -e "$deprecations_log" ]; then
echo "No Symfony deprecations log was generated for the unit suite."
exit 0
fi
if [ ! -s "$deprecations_log" ]; then
echo "Symfony deprecations log for the unit suite is empty."
exit 0
fi
echo "Symfony deprecations for the unit suite:"
cat "$deprecations_log"
- name: "Upload unit coverage to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
files: ".coverage/unit.xml"
flags: "unit"
name: "phpunit-without-rmq-redis-unit-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
- name: "Upload unit test results to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
report_type: "test_results"
files: ".coverage/unit.junit.xml"
flags: "unit,php-${{ matrix.php }},db-${{ matrix.database }},run-no-rmq-redis"
name: "phpunit-without-rmq-redis-test-results-unit-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
- name: "Run PHPUnit integration tests"
if: ${{ !cancelled() }}
env:
SYMFONY_DEPRECATIONS_HELPER: "${{ env.WALLABAG_SYMFONY_DEPRECATIONS_HELPER_BASE }}&logFile=${{ runner.temp }}/wallabag-phpunit-integration.deprecations.log"
run: "php bin/phpunit --testsuite integration -v --coverage-clover=.coverage/integration.xml --log-junit=.coverage/integration.junit.xml"
- name: "Display PHPUnit integration Symfony deprecations"
if: ${{ !cancelled() }}
run: |
deprecations_log="${{ runner.temp }}/wallabag-phpunit-integration.deprecations.log"
if [ ! -e "$deprecations_log" ]; then
echo "No Symfony deprecations log was generated for the integration suite."
exit 0
fi
if [ ! -s "$deprecations_log" ]; then
echo "Symfony deprecations log for the integration suite is empty."
exit 0
fi
echo "Symfony deprecations for the integration suite:"
cat "$deprecations_log"
- name: "Upload integration coverage to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
files: ".coverage/integration.xml"
flags: "integration"
name: "phpunit-without-rmq-redis-integration-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
- name: "Upload integration test results to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
report_type: "test_results"
files: ".coverage/integration.junit.xml"
flags: "integration,php-${{ matrix.php }},db-${{ matrix.database }},run-no-rmq-redis"
name: "phpunit-without-rmq-redis-test-results-integration-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
- name: "Run PHPUnit functional tests"
if: ${{ !cancelled() }}
env:
SYMFONY_DEPRECATIONS_HELPER: "${{ env.WALLABAG_SYMFONY_DEPRECATIONS_HELPER_BASE }}&logFile=${{ runner.temp }}/wallabag-phpunit-functional.deprecations.log"
run: "php bin/phpunit --testsuite functional -v --coverage-clover=.coverage/functional.xml --log-junit=.coverage/functional.junit.xml"
- name: "Display PHPUnit functional Symfony deprecations"
if: ${{ !cancelled() }}
run: |
deprecations_log="${{ runner.temp }}/wallabag-phpunit-functional.deprecations.log"
if [ ! -e "$deprecations_log" ]; then
echo "No Symfony deprecations log was generated for the functional suite."
exit 0
fi
if [ ! -s "$deprecations_log" ]; then
echo "Symfony deprecations log for the functional suite is empty."
exit 0
fi
echo "Symfony deprecations for the functional suite:"
cat "$deprecations_log"
- name: "Upload functional coverage to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
files: ".coverage/functional.xml"
flags: "functional"
name: "phpunit-without-rmq-redis-functional-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
- name: "Upload functional test results to Codecov"
if: ${{ !cancelled() }}
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
report_type: "test_results"
files: ".coverage/functional.junit.xml"
flags: "functional,php-${{ matrix.php }},db-${{ matrix.database }},run-no-rmq-redis"
name: "phpunit-without-rmq-redis-test-results-functional-php${{ matrix.php }}-${{ matrix.database }}"
disable_search: true
fail_ci_if_error: false
bundle-analysis:
name: "Bundle analysis"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1" # v7.0.1
with:
fetch-depth: 2
- name: "Detect changed bundle-relevant files"
id: changed-files
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
with:
files: |
webpack.config.js
postcss.config.js
package.json
yarn.lock
.nvmrc
assets/**
- name: "Install Node"
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: ".nvmrc"
cache: 'yarn'
- name: "Install dependencies with Yarn"
if: steps.changed-files.outputs.any_changed == 'true'
run: yarn install
- name: "Build assets and upload bundle analysis"
if: steps.changed-files.outputs.any_changed == 'true'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: yarn build:prod
codecov-notify:
name: "Notify Codecov"
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
needs:
- phpunit
- phpunit_no_prefix
- phpunit-without-rmq-redis
steps:
- name: "Checkout"
uses: "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1" # v7.0.1
with:
fetch-depth: 2
- name: "Send Codecov notifications"
uses: "codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5" # v7.1.1
continue-on-error: true
with:
token: "${{ secrets.CODECOV_TOKEN }}"
run_command: "send-notifications"
fail_ci_if_error: false