Skip to content

Commit

Permalink
Adjust pipeline for multiple ilias versions
Browse files Browse the repository at this point in the history
  • Loading branch information
thojou committed Feb 28, 2024
1 parent 189d857 commit 811d2b0
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
name: CI

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
PLUGIN_PATH: Customizing/global/libs/ilias-plugin-utils
MATRIX: |
{
"release/7": {"php": ["7.4"], "ilias": ["release_7"]},
"release/8": {"php": ["8.0"], "ilias": ["release_8"]}
}
on:
push:
branches:
- release/*
pull_request:

jobs:
build-matrix:
if: "!contains(github.event.head_commit.message, '[CI SKIP]')"
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: echo "::set-output name=matrix::$(echo $MATRIX | jq -c --arg branch $BRANCH_NAME '.[$branch]')"

PHPUnit:
name: PHPUnit (PHP ${{ matrix.php }})
if: "!contains(github.event.head_commit.message, '[CI SKIP]')"
runs-on: ubuntu-22.04
env:
PLUGIN_PATH: Customizing/global/libs/ilias-plugin-utils
needs: build-matrix
name: Check (ILIAS ${{ matrix.ilias }} PHP ${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php: 7.4
ilias: release_7
if: BRANCH_NAME == 'release/7'
- php: 8.0
ilias: release_8
if: BRANCH_NAME == 'release/8'
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
with:
Expand Down

0 comments on commit 811d2b0

Please sign in to comment.