Skip to content

Commit 774bacc

Browse files
committed
more
1 parent 77f1148 commit 774bacc

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

.github/workflows/ci-test.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
# use for multiple os or ubuntu versions
2828
# os: [ubuntu-latest, macos-latest, windows-latest]
2929

30-
#env:
30+
env:
3131
# OS: ${{ matrix.os }}
32-
# PYTHON: ${{ matrix.python-version }}
32+
PYTHON_VERSION: ${{ matrix.python-version }}
3333

3434
steps:
3535
# Checkout the latest code from the repo
@@ -44,11 +44,10 @@ jobs:
4444

4545
# Display the Python version being used
4646
- name: Display Python version
47-
run: python -c "import sys; print(sys.version)"
47+
run: python -c "import sys; print(sys.version)"; echo $PYTHON_VERSION
4848

4949
# Install the databases
5050
- name: Install postgres
51-
if: ${{ false }}
5251
run: |
5352
sudo apt-get install postgresql
5453
# Disable fsync for speed, don't care about data durability when testing
@@ -73,11 +72,9 @@ jobs:
7372
# sed -i 's/CREATE DATABASE \%s/CREATE DATABASE \%s COLLATE utf8_general_ci/' roundup/backends/back_mysql.py
7473
7574
- name: Update pip
76-
if: ${{ false }}
7775
run: python -m pip install --upgrade pip
7876

7977
- name: Install db libraries
80-
if: ${{ false }}
8178
run: pip install psycopg2 mysqlclient
8279

8380
- name: Install auxilary packages
@@ -115,7 +112,20 @@ jobs:
115112
116113
# Run the tests using pytest with test files in tests directory.
117114
- name: Run tests
118-
run: pytest -v tests
115+
run: |
116+
if [[ $(python -c 'import sys; print("%d.%d.%d"%(sys.version_info.major, sys.version_info.minor, sys.version_info.micro))') != "2."* ]]; then
117+
pytest -r a \
118+
-W default \
119+
-W "ignore:SelectableGroups:DeprecationWarning" \
120+
-W "ignore:the imp module:DeprecationWarning:gpg.gpgme:15" \
121+
-W "ignore:'U' mode::docutils.io" \
122+
-W "ignore:unclosed:ResourceWarning:roundup.roundup.demo" \
123+
-W "ignore:unclosed file:ResourceWarning:enum" \
124+
-v --maxfail=5 test/ --cov=roundup
125+
else
126+
# python2 case
127+
pytest -v -r a --maxfail=5 test/ --cov=roundup
128+
fi
119129
120130
- name: Upload coverage to Codecov
121131
# see: https://github.com/codecov/codecov-action#usage

0 commit comments

Comments
 (0)