0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-20 03:36:20 +02:00
postfixadmin/.github/workflows/php.yml

97 lines
2.2 KiB
YAML
Raw Normal View History

2020-03-02 15:17:41 +01:00
name: GitHubBuild
2020-01-10 14:24:58 +01:00
on: [push]
jobs:
2021-10-22 23:43:01 +02:00
lint_etc:
2022-10-12 21:41:14 +02:00
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
tools: composer
extensions: sqlite3
2021-10-24 12:24:50 +02:00
- name: run install.sh
run: /bin/bash install.sh
2022-07-15 11:24:41 +02:00
- name: check composer
run: composer validate
# Needing to 'update' here isn't ideal, but we need to cope with tests that run under different PHP versions :-/
- name: Install dependencies
run: composer update --prefer-dist -n
- name: check formatting
run: composer check-format
2021-09-29 22:17:17 +02:00
- name: touch config.local.php
2022-07-15 11:24:41 +02:00
run: touch config.local.php
2021-09-29 22:17:17 +02:00
- name: psalm static analysis
run: composer psalm
testsuite:
2021-10-22 23:43:01 +02:00
needs: [lint_etc]
runs-on: ubuntu-22.04
2021-06-11 22:14:21 +02:00
strategy:
matrix:
php-versions: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]
2020-01-10 14:24:58 +01:00
steps:
2021-06-11 22:14:21 +02:00
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer
extensons: sqlite3
2020-01-10 14:24:58 +01:00
2022-07-15 11:24:41 +02:00
- name: run install.sh
run: /bin/bash install.sh
2020-01-10 14:47:16 +01:00
2020-01-31 16:27:43 +01:00
- name: touch config.local.php
2020-01-31 17:15:42 +01:00
run: touch config.local.php && php -v
2020-01-31 16:27:43 +01:00
2020-01-10 14:24:58 +01:00
- name: Install dependencies
2021-06-11 22:14:21 +02:00
run: composer install --prefer-dist -n
2020-01-10 14:24:58 +01:00
2020-02-23 20:01:09 +01:00
- name: Build/test
run: composer test
2020-02-23 20:01:09 +01:00
build_coverage_report:
2021-09-29 22:12:43 +02:00
needs: [testsuite]
2022-10-12 22:09:31 +02:00
continue-on-error: true
runs-on: ubuntu-22.04
2021-06-11 22:55:02 +02:00
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: composer
extensions: sqlite3
2021-06-11 22:55:02 +02:00
2022-07-15 11:24:41 +02:00
- name: run install.sh
run: /bin/bash install.sh
2021-06-11 22:55:02 +02:00
- name: touch config.local.php
run: touch config.local.php && php -v
- name: Install dependencies
run: composer update --prefer-dist -n
2021-06-11 22:55:02 +02:00
- name: build coveralls coverage
2021-06-11 23:02:21 +02:00
run: php -d xdebug.mode=coverage vendor/bin/phpunit tests
2021-06-11 22:55:02 +02:00
- name: Coveralls
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v || true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
2021-06-11 22:14:21 +02:00