Skip to content

Commit

Permalink
Get working with SSPv2 (#160)
Browse files Browse the repository at this point in the history
Various code changes related to bringing up compatibility with version 2 of SimpleSAMLphp.


---------

Co-authored-by: Tim van Dijen <[email protected]>
Co-authored-by: Marko Ivančić <[email protected]>
  • Loading branch information
3 people authored Mar 22, 2023
1 parent 776a26f commit 2867977
Show file tree
Hide file tree
Showing 233 changed files with 1,350 additions and 1,326 deletions.
66 changes: 19 additions & 47 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ["7.4"]
php-versions: ["7.4", "8.0", "8.1"]

steps:
- name: Setup PHP, with composer and extensions
Expand All @@ -35,14 +35,14 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -54,9 +54,6 @@ jobs:
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Syntax check PHP
run: bash vendor/bin/check-syntax-php.sh

- name: Decide whether to run code coverage or not
if: ${{ matrix.php-versions != '7.4' }}
run: |
Expand Down Expand Up @@ -90,7 +87,7 @@ jobs:
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Get composer cache directory
id: composer-cache
Expand Down Expand Up @@ -131,14 +128,14 @@ jobs:
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -147,12 +144,6 @@ jobs:
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Syntax check YAML / XML / JSON
run: |
bash vendor/bin/check-syntax-yaml.sh
bash vendor/bin/check-syntax-xml.sh
bash vendor/bin/check-syntax-json.sh
quality:
name: Quality control
runs-on: [ubuntu-latest]
Expand All @@ -169,14 +160,14 @@ jobs:
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -185,13 +176,13 @@ jobs:
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

- uses: actions/download-artifact@v1
- uses: actions/download-artifact@v3
with:
name: build-data
path: ${{ github.workspace }}/build

- name: Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3

- name: PHP Code Sniffer
if: always()
Expand All @@ -201,21 +192,19 @@ jobs:
if: always()
run: php vendor/bin/psalm --show-info=true

- name: Psalter
if: always()
run: php vendor/bin/psalter --issues=UnnecessaryVarAnnotation --dry-run

build-conformance-suite:
conformance-suite:
runs-on: ubuntu-latest
env:
VERSION: release-v4.1.11
SUITE_BASE_URL: https://localhost.emobix.co.uk:8443
VERSION: release-v4.1.45
steps:
- name: Load Cached Conformance Suite Build
uses: actions/cache@v2
id: cache
- uses: actions/checkout@v3
with:
path: ./conformance-suite
key: suite-${{ hashFiles('**/test.yml') }}
path: main
- name: Setup Python Dependencies
run: |
pip install --upgrade pip
pip install httpx
- name: Conformance Suite Checkout
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: git clone --depth 1 --single-branch --branch $VERSION https://gitlab.com/openid/conformance-suite.git
Expand All @@ -228,23 +217,6 @@ jobs:
sed -i -e 's/localhost/localhost.emobix.co.uk/g' src/main/resources/application.properties
sed -i -e 's/-B clean/-B -DskipTests=true/g' builder-compose.yml
docker-compose -f builder-compose.yml run builder
conformance-suite:
runs-on: ubuntu-latest
needs:
- build-conformance-suite
env:
SUITE_BASE_URL: https://localhost.emobix.co.uk:8443
steps:
- uses: actions/checkout@v2
with:
path: main
- name: Load Cached Conformance Suite Build
uses: actions/cache@v2
id: cache
with:
path: ./conformance-suite
key: suite-${{ hashFiles('**/test.yml') }}
- name: Run Conformance Suite
working-directory: ./conformance-suite
run: |
Expand Down
2 changes: 1 addition & 1 deletion CONFORMANCE_TEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Clone the conformance test git repo, build the software and run it.
git clone https://gitlab.com/openid/conformance-suite.git
cd conformance-suite
# Version 4.1.10 has a bug when building
git checkout release-v4.1.9
git checkout release-v4.1.45
MAVEN_CACHE=./m2 docker-compose -f builder-compose.yml run builder
docker-compose up
```
Expand Down
Loading

0 comments on commit 2867977

Please sign in to comment.