Skip to content

Update README.md

Update README.md #43

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- v*
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python "3.11"
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Lint with lintrunner
uses: justinchuby/lintrunner-action@main
test:
name: Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python_version: ["3.8", "3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
python -m pip install -r requirements-dev.txt
python -m pip install .
- name: Run pytest
run: |
pytest -v
build:
name: Build
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Python build dependencies
run: |
python -m pip install --upgrade pip build wheel
- name: Build wheels
run: |
python -m build
- name: Upload wheels
uses: actions/upload-artifact@v3
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
with:
name: dist
path: dist
release:
name: Release
environment: release
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: [test, build, lint]
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: Publish package
uses: pypa/gh-action-pypi-publish@f5622bde02b04381239da3573277701ceca8f6a0