Skip to content

Commit

Permalink
Merge branch 'main' into feature/PTFE-1481-fixes-and-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmet authored Apr 25, 2024
2 parents 3fa7737 + 68afcf3 commit 6222d8c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 13 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
name: basic tests

on:
pull_request:
branches:
- main
push:
branches:
- 'user/**'
- 'feature/**'
- 'improvement/**'
- 'bugfix/**'
- 'dependabot/**'
- 'w/**'
- 'q/**'
- main

permissions: write-all

Expand All @@ -20,7 +17,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
Expand All @@ -35,14 +32,20 @@ jobs:
- run: tox -e tests-api-mock
- run: tox -e coverage-report
- run: tox -e tests-server
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
flags: unittests,server,api-mock

tests-noqueue:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
Expand All @@ -51,14 +54,20 @@ jobs:
- name: Install tox
run: pip install tox
- run: tox -e tests-noqueue
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
flags: tests-noqueue

all-tests:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
Expand All @@ -67,14 +76,20 @@ jobs:
- name: Install tox
run: pip install tox
- run: tox -e tests
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
flags: all-tests

lint:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ settings.yml
.pytest_cache/
build/
.env
coverage.xml
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ py-gfm==0.1.4
pytest==7.4.2
PyYAML==6.0
requests==2.28.2
requests-mock==1.10.0
requests-mock==1.12.1
werkzeug==2.2.3
WTForms==3.0.1
jwt==1.3.1
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ commands = flake8 bert_e/
[testenv:utests]
deps =
pip==22.3.1
commands = pytest bert_e/tests/unit/ {posargs}
pytest-cov==5.0.0
commands = pytest bert_e/tests/unit/ --cov=bert_e --cov-report=xml {posargs}

[testenv:tests-api-mock]
deps =
Expand Down

0 comments on commit 6222d8c

Please sign in to comment.