Skip to content

Commit d54f9d4

Browse files
authored
feat: Update requirements.txt for latest casbin version and .github actions test added (#28)
* Update requirements.txt for latest casbin version * .github actions added for test
1 parent a60a2df commit d54f9d4

File tree

3 files changed

+62
-1
lines changed

3 files changed

+62
-1
lines changed

.github/semantic.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Always validate the PR title AND all the commits
2+
titleAndCommits: true

.github/workflows/release.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches: [ master ]
8+
jobs:
9+
tests_Ubuntu:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: [ 3.6, 3.7, 3.8, 3.9 ]
15+
os: [ ubuntu-latest ]
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install dependencies
27+
run: |
28+
pip install -r requirements.txt
29+
pip install -r dev_requirements.txt --upgrade
30+
pip install coveralls
31+
32+
- name: Run tests
33+
run: |
34+
pytest --cov flask_authz
35+
36+
coverall:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v2
41+
42+
- name: Set up Python
43+
uses: actions/setup-python@v2
44+
with:
45+
python-version: 3.9
46+
47+
- name: Install dependencies
48+
run: |
49+
pip install -r requirements.txt
50+
pip install -r dev_requirements.txt
51+
pip install coveralls
52+
53+
- name: Run tests
54+
run: coverage run -m unittest discover -s tests -t tests
55+
56+
- name: Upload coverage data to coveralls.io
57+
run: coveralls --service=github
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
casbin>=0.8.4,==1.0.4
1+
casbin==1.0.4
22
click==7.1.2
33
flask==1.1.2
44
itsdangerous==1.1.0

0 commit comments

Comments
 (0)