Skip to content

Make it possible to opt-out from loose is/is-not operations (#12) #54

Make it possible to opt-out from loose is/is-not operations (#12)

Make it possible to opt-out from loose is/is-not operations (#12) #54

Workflow file for this run

name: CI
on:
push:
branches: [master]
tags: ["v*"]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: "**/setup.cfg"
- name: Install dependencies
run: pip install -e .[test]
- name: Test with pytest
run: pytest -v --cov .
- uses: codecov/codecov-action@v3
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
cache-dependency-path: "**/setup.cfg"
- uses: pre-commit/[email protected]
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
cache-dependency-path: "**/setup.cfg"
- run: pip install build
- run: python -m build .
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs:
- build
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/leval/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
print-hash: true