Skip to content

Commit

Permalink
chore: major change in testing strategy, removed travis
Browse files Browse the repository at this point in the history
Made pytest the default testing in actions.
  • Loading branch information
joamag committed Aug 6, 2024
1 parent c53508f commit 8bb45c1
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,19 @@ jobs:
latest,
rc
]
adapter: ["tiny", "mongo"]
runs-on: ubuntu-latest
container: python:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- run: |
curl -fsSL https://pgp.mongodb.com/server-7.0.asc | gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/debian $(. /etc/os-release && echo "$VERSION_CODENAME")/mongodb-org/7.0 main" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list
apt-get update && apt-get install -y mongodb-org mongodb-org-server mongodb-org-database\
mongodb-org-mongos mongodb-org-shell mongodb-org-tools && mkdir -p /data/db
if: matrix.adapter == 'mongo'
- run: mongod &
if: matrix.adapter == 'mongo'
- run: python --version
- run: |
pip install -r requirements.txt
Expand All @@ -35,16 +44,29 @@ jobs:
pip install black
black . --check
if: matrix.python-version == '3.12'
- run: ADAPTER=tiny python setup.py test
- run: |
pip install pytest
ADAPTER=${{ matrix.adapter }} pytest
- run: ADAPTER=${{ matrix.adapter }} python setup.py test
if: matrix.python-version != '3.12' && matrix.python-version != 'latest'
build-pypy:
name: Build PyPy
strategy:
matrix:
python-version: [2.7, 3.6]
adapter: ["tiny", "mongo"]
runs-on: ubuntu-latest
container: pypy:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- run: |
curl -fsSL https://pgp.mongodb.com/server-7.0.asc | gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/debian $(. /etc/os-release && echo "$VERSION_CODENAME")/mongodb-org/7.0 main" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list
apt-get update && apt-get install -y mongodb-org mongodb-org-server mongodb-org-database\
mongodb-org-mongos mongodb-org-shell mongodb-org-tools && mkdir -p /data/db
if: matrix.adapter == 'mongo'
- run: mongod &
if: matrix.adapter == 'mongo'
- run: pypy --version
- run: |
pip install -r requirements.txt
Expand All @@ -58,4 +80,8 @@ jobs:
pip install black
black . --check
if: matrix.python-version == '3.12'
- run: ADAPTER=tiny pypy setup.py test
- run: |
pip install pytest
ADAPTER=${{ matrix.adapter }} pytest
- run: ADAPTER=${{ matrix.adapter }} pypy setup.py test
if: matrix.python-version != '3.12' && matrix.python-version != 'latest'
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pytest]
python_files = *.py
testpaths = src/budy/test

0 comments on commit 8bb45c1

Please sign in to comment.