0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00
postfixadmin/.github/workflows/php.yml

103 lines
2.5 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@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
tools: composer
extensions: sqlite3, gd
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:
- uses: actions/checkout@v4
- name: Install Dovecot
run: |
set -eux
sudo apt-get update -q
sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq dovecot-core
sudo sh -c '/sbin/useradd -G dovecot runner || usermod -aG dovecot runner '
2021-06-11 22:14:21 +02:00
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer
extensions: sqlite3, gd
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: sudo -u runner composer test
2020-02-23 20:01:09 +01:00
# build_coverage_report:
# needs: [testsuite]
# continue-on-error: true
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4
#
# - name: Setup PHP
# uses: shivammathur/setup-php@v2
# with:
# php-version: '7.4'
# tools: composer
# extensions: sqlite3, gd
#
# - name: run install.sh
# run: /bin/bash install.sh
#
# - name: touch config.local.php
# run: touch config.local.php && php -v
#
# - name: Install dependencies
# run: composer update --prefer-dist -n
#
# - name: build coveralls coverage
# run: php -d xdebug.mode=coverage vendor/bin/phpunit tests
#
# - name: Coveralls
# run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v || true
# env:
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}