Skip to content

Commit c47ef3c

Browse files
committed
chore: CI with gh actions
1 parent 75d8ac3 commit c47ef3c

File tree

2 files changed

+59
-102
lines changed

2 files changed

+59
-102
lines changed

.github/workflows/python-app.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: pysaml2
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version:
21+
- '3.6'
22+
- '3.7'
23+
- '3.8'
24+
- '3.9'
25+
- '3.10-dev'
26+
- 'pypy3'
27+
mongodb-version:
28+
- '4.4'
29+
30+
steps:
31+
- uses: actions/checkout@v2
32+
- name: Set up Python ${{ matrix.python-version }}
33+
uses: actions/setup-python@v2
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
- name: Install system dependencies
37+
run: |
38+
sudo apt-get update && sudo apt-get install xmlsec1
39+
python -m pip install --upgrade pip tox rstcheck setuptools codecov pytest-cov flake8
40+
- name: Install python dependencies
41+
run: |
42+
python -m pip install --upgrade pip
43+
if [ -f tests/test-requirements.txt ]; then pip install -r tests/test-requirements.txt; fi
44+
python setup.py install
45+
- name: Lint with flake8
46+
run: |
47+
# stop the build if there are Python syntax errors or undefined names
48+
flake8 ./src --count --select=E9,F63,F7,F82 --show-source --statistics
49+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
50+
flake8 ./src --count --exit-zero --statistics
51+
52+
- name: Start MongoDB
53+
uses: supercharge/[email protected]
54+
with:
55+
mongodb-version: ${{ matrix.mongodb-version }}
56+
57+
- name: PySAML2 tests
58+
run: |
59+
pytest --cov=saml2 tests

.travis.yml

-102
This file was deleted.

0 commit comments

Comments
 (0)