chore: major change in testing strategy, removed travis #258
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
name: Main Workflow | |
on: [push] | |
jobs: | |
build: | |
name: Build | |
strategy: | |
matrix: | |
python-version: [ | |
2.7, | |
3.5, | |
3.6, | |
3.7, | |
3.8, | |
3.9, | |
"3.10", | |
"3.11", | |
"3.12", | |
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 | |
pip install -r extra.txt | |
if: matrix.python-version != '2.7' | |
- run: | | |
pip install -r requirements.py2.txt | |
pip install -r extra.py2.txt | |
if: matrix.python-version == '2.7' | |
- run: | | |
pip install black | |
black . --check | |
if: matrix.python-version == '3.12' | |
- 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 | |
pip install -r extra.txt | |
if: matrix.python-version != '2.7' | |
- run: | | |
pip install -r requirements.py2.txt | |
pip install -r extra.py2.txt | |
if: matrix.python-version == '2.7' | |
- run: | | |
pip install black | |
black . --check | |
if: matrix.python-version == '3.12' | |
- 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' |