Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI #106

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/_python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Satosa-Saml2Spid

on:
push:
branches: [ master, dev, eudi, fix-ci ]
pull_request:
branches: [ master, dev, eudi, fix-ci ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version:
- '3.10'

steps:
- uses: actions/checkout@v3
- name: Install xmlsec1
run: sudo apt-get install -y xmlsec1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install spid-sp-test>=1.2.8
pip install flake8
- name: Lint with flake8
run: |
## stop the build if there are Python syntax errors or undefined names
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics example
## exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 --max-line-length 120 --count --exit-zero --statistics example
- name: Create docker-example folder
run: |
mkdir -p docker-example
cp -r example/. docker-example
- name: docker compose
run: |
cd Docker-compose
./run-docker-compose.sh
docker ps -a
- name: djangosaml2 SP metadata to Proxy
run: |
wget http://localhost:8000/saml2/metadata -O example/metadata/sp/djangosaml2_sp.xml
- name: run satosa-saml2spid
run: |
cd docker-example
mkdir -p metadata/idp
mkdir -p metadata/sp
- name: Metadata proxy to djangosaml2 SP
run: |
wget --no-check-certificate https://localhost/Saml2IDP/metadata -O example_sp/djangosaml2_sp/saml2_sp/saml2_config/satosa-saml2spid.xml
- name: spid-sp-test SPID metadata, requests and responses
run: |
cd docker-example
spid_sp_test --idp-metadata > metadata/idp/spid-sp-test.xml
spid_sp_test --metadata-url https://localhost/spidSaml2/metadata --authn-url "http://localhost:8000/saml2/login/?idp=https://localhost/Saml2IDP/metadata&next=/saml2/echo_attributes&idphint=https%253A%252F%252Flocalhost%253A8080" -ap spid_sp_test.plugins.authn_request.SatosaSaml2Spid --extra --debug ERROR -tr
- name: spid-sp-test CIE id metadata
run: |
cd docker-example
spid_sp_test --profile cie-sp-public --metadata-url https://localhost/cieSaml2/metadata
- name: spid-sp-test eIDAS FiCEP metadata
run: |
cd docker-example
spid_sp_test --profile ficep-eidas-sp --metadata-url https://localhost/spidSaml2/metadata
4 changes: 2 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: docker compose
run: |
cd Docker-compose
docker compose -f docker-compose.yml up -d
./run-docker-compose.sh
- name: djangosaml2 SP metadata to Proxy
run: |
wget http://localhost:8000/saml2/metadata -O example/metadata/sp/djangosaml2_sp.xml
Expand All @@ -67,4 +67,4 @@ jobs:
- name: spid-sp-test eIDAS FiCEP metadata
run: |
cd docker-example
spid_sp_test --profile ficep-eidas-sp --metadata-url https://localhost/spidSaml2/metadata
spid_sp_test --profile ficep-eidas-sp --metadata-url https://localhost/spidSaml2/metadata
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jinja2

# Wallet RP
# pyeudiw[satosa,federation]
pyeudiw
git+https://github.com/italia/eudi-wallet-it-python@dev

Pillow>=10.0.0,<10.1
device_detector>=5.0,<6
Expand Down
Loading