Skip to content

Remove support for python 3.6 and 3.7 #19

Remove support for python 3.6 and 3.7

Remove support for python 3.6 and 3.7 #19

Workflow file for this run

name: CI Pipeline
on: [push]
env:
MAIN_PYTHON: "3.9"
jobs:
test:
name: Test 🧪
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup BibTex
uses: teatimeguest/setup-texlive-action@v3
with:
packages: bibtex
- name: Setup OS dependencies
run: sudo apt-get -yqq install xclip xvfb
- name: Install dependencies
run: pip install .[dev]
- name: Check code formatting
run: black . --check
- name: Run type check
run: mypy . --exclude build
- name: Run unit tests with Xvfb (necessary for clipboard tests) and coverage
run: xvfb-run coverage run -m pytest
- name: Store the coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report-${{ matrix.python-version }}
path: .coverage
publish-coverage:
name: Publish coverage report 📊 to Codecov
runs-on: ubuntu-latest
needs: test
steps:
- name: Download the coverage reports
uses: actions/download-artifact@v4
with:
name: coverage-report-${{ env.MAIN_PYTHON }}
- name: Publish coverage report
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: .coverage
token: ${{ secrets.CODECOV_TOKEN }}
build:
name: Build distribution 📦
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup python ${{ env.MAIN_PYTHON }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.MAIN_PYTHON }}
- name: Install pypa/build
run: pip install build
- name: Build a binary wheel and a source tarball
run: python -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: Publish Python 🐍 distribution 📦 to PyPI
if: github.ref == 'refs/heads/master' # only publish to PyPI on pushes to master
needs:
- test
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/bibo
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1