Upgrade github actions to node 20 #328
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: CI Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
- v4 | |
jobs: | |
staticanalyses: | |
strategy: | |
fail-fast: false | |
matrix: | |
rcube-version: ['release-1.4', 'release-1.5', 'release-1.6', 'master'] | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout rcmcarddav | |
uses: actions/checkout@v4 | |
- name: Set up CI environment | |
uses: ./.github/actions/setup | |
with: | |
rcube-version: ${{ matrix.rcube-version }} | |
- name: Check code style compliance with PSR12 | |
run: make stylecheck | |
- name: Check code compatibility with minimum supported PHP version | |
run: make phpcompatcheck | |
- name: Run psalm static analysis | |
run: make psalmanalysis | |
- name: Check test datasets have a description | |
run: make checktestspecs | |
unittests: | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: ['7.4', '8.0', '8.1', '8.2'] | |
runs-on: ubuntu-20.04 | |
env: | |
XDEBUG_MODE: coverage | |
steps: | |
- name: Checkout rcmcarddav | |
uses: actions/checkout@v4 | |
- name: Set up CI environment | |
uses: ./.github/actions/setup | |
with: | |
php-version: ${{ matrix.php-version }} | |
- name: Run unit tests | |
run: make unittests | |
- name: Upload unit test coverage reports to codecov.io | |
uses: codecov/codecov-action@v4 | |
with: | |
files: testreports/unit/clover.xml | |
flags: unittests | |
name: RCMCardDAV unit test coverage | |
dbinterop-sqlite3: | |
runs-on: ubuntu-20.04 | |
env: | |
XDEBUG_MODE: coverage | |
steps: | |
- name: Checkout rcmcarddav | |
uses: actions/checkout@v4 | |
- name: Set up CI environment | |
uses: ./.github/actions/setup | |
- name: Database interoperability tests for SQLite3 | |
run: make tests-sqlite3 | |
- name: Upload DB interoperability test coverage reports to codecov.io | |
uses: codecov/codecov-action@v4 | |
with: | |
files: testreports/dbinterop-sqlite3/clover.xml | |
flags: dbinterop-sqlite3 | |
name: RCMCardDAV SQLite3 database interoperability test coverage | |
dbinterop-mysql: | |
strategy: | |
fail-fast: false | |
matrix: | |
mysql-version: | |
- 'mysql:5.6' | |
- 'mysql:5.7' | |
- 'mysql:8' | |
- 'mariadb:10.2' | |
- 'mariadb:10.3' | |
- 'mariadb:10.4' | |
- 'mariadb:10.5' | |
- 'mariadb:10.6' | |
- 'mariadb:10.7' | |
- 'mariadb:10.8' | |
- 'mariadb:10.9' | |
runs-on: ubuntu-20.04 | |
env: | |
XDEBUG_MODE: coverage | |
MYSQL_PASSWORD: root | |
MYSQL_CMD_PREFIX: "docker exec -i mysql" | |
services: | |
mysql: | |
image: ${{ matrix.mysql-version }} | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
options: >- | |
--health-cmd "mysqladmin ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
--name mysql | |
ports: | |
- 3306:3306 | |
steps: | |
- name: Checkout rcmcarddav | |
uses: actions/checkout@v4 | |
- name: Set up CI environment | |
uses: ./.github/actions/setup | |
- name: Set MySQL settings | |
if: ${{ matrix.mysql-version == 'mysql:5.6' }} | |
run: cat .github/configs/mysqlsettings.sql | docker exec -i mysql mysql -uroot -proot | |
- name: Database interoperability tests for MySQL | |
run: make tests-mysql | |
- name: Upload DB interoperability test coverage reports to codecov.io | |
uses: codecov/codecov-action@v4 | |
with: | |
files: testreports/dbinterop-mysql/clover.xml | |
flags: dbinterop-mysql | |
name: RCMCardDAV MySQL database interoperability test coverage | |
dbinterop-postgres: | |
strategy: | |
fail-fast: false | |
matrix: | |
postgres-version: ['9', '10', '11', '12', '13', '14', '15'] | |
runs-on: ubuntu-20.04 | |
env: | |
XDEBUG_MODE: coverage | |
PGHOST: localhost | |
PGUSER: postgres | |
POSTGRES_CMD_PREFIX: "docker exec -i -e PGUSER=postgres postgres" | |
services: | |
postgres: | |
image: postgres:${{ matrix.postgres-version }}-alpine | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
--name postgres | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Checkout rcmcarddav | |
uses: actions/checkout@v4 | |
- name: Set up CI environment | |
uses: ./.github/actions/setup | |
- name: Database interoperability tests for Postgres | |
run: make tests-postgres | |
- name: Upload DB interoperability test coverage reports to codecov.io | |
uses: codecov/codecov-action@v4 | |
with: | |
files: testreports/dbinterop-postgres/clover.xml | |
flags: dbinterop-postgres | |
name: RCMCardDAV PostgreSQL database interoperability test coverage |