Skip to content

version: 0.4.2

version: 0.4.2 #8

Workflow file for this run

name: Deploy Workflow
on:
push:
tags:
- "*"
jobs:
build:
name: Build
timeout-minutes: 10
strategy:
matrix:
python-version: ["2.7-buster"]
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
- run: mongod &
- run: python --version
- run: |
pip install -r requirements.txt
pip install -r extra.txt
if: matrix.python-version != '2.7-buster'
- run: |
pip install -r requirements.py2.txt
pip install -r extra.py2.txt
if: matrix.python-version == '2.7-buster'
- run: |
pip install black
black . --check
if: matrix.python-version == '3.12'
- run: python setup.py test
- run: pip install twine wheel
- run: python setup.py sdist bdist_wheel
- run: python -m twine upload -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} dist/*
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}