-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #252 from allegro/aj-use-pytest
Use pytest on CI
- Loading branch information
Showing
5 changed files
with
26 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,19 +11,23 @@ on: | |
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.7 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Setup github username | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "fake name" | ||
- name: Setup docker | ||
run: | | ||
sudo apt install apt-transport-https ca-certificates curl software-properties-common | ||
|
@@ -35,16 +39,15 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install bs4 | ||
pip install pytest | ||
pip install bigflow | ||
pip install -r requirements.txt | ||
pip install -r test/requirements.txt | ||
sudo apt install docker | ||
- name: Tests | ||
- name: Run unit tests | ||
run: | | ||
python -m unittest discover -s bigflow -t . -p '*.py' | ||
python -m unittest discover -s test -p '*.py' | ||
pytest --html=build/test-report.html --self-contained-html | ||
- name: Upload test report | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: test-report | ||
path: build/test-report.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.pytest.ini_options] | ||
minversion = "6.0" | ||
#addopts = "-ra -q" | ||
testpaths = [ | ||
"test", | ||
"bigflow", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters