Skip to content

Commit

Permalink
Add test setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Osswald committed Apr 3, 2021
1 parent e0b4181 commit f47c267
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ charset = utf-8
[*.py]
indent_style = space
indent_size = 4

[*.yaml]
indent_style = space
indent_size = 2
34 changes: 34 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI Runner

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
python -m poetry install
- name: Codestyle Checks
run: |
python -m poetry run flake8 .
python -m poetry run black . --check
python -m poetry run isort . --check
- name: Test with pytest
run: |
python -m poetry run pytest
- name: Dependency Check
run: |
python -m poetry run bandit -r fastapi_opa
123 changes: 122 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ flake9 = "^3.8.3"
black = "^20.8b1"
isort = "^5.8.0"
bandit = "^1.7.0"
pytest = "^6.2.2"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
Empty file added tests/__init__.py
Empty file.
2 changes: 2 additions & 0 deletions tests/test_opa_requests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test_dummy():
assert True

0 comments on commit f47c267

Please sign in to comment.