Use optional rather than | in type annotation for cli #37
Workflow file for this run
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: CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install gotranx | |
run: | | |
python -m pip install -e ".[test]" | |
- name: Test with pytest | |
run: | | |
python -m pytest | |
- name: Coverage report | |
uses: codecov/codecov-action@v3 | |
if: github.ref == 'refs/heads/main' && matrix.python-version == '3.10' | |
with: | |
fail_ci_if_error: true | |
files: ./coverage.xml | |
- name: Install pypa/build | |
run: >- | |
python3 -m | |
pip install | |
build | |
--user | |
- name: Build a binary wheel and a source tarball | |
run: >- | |
python3 -m | |
build | |
--sdist | |
--wheel | |
--outdir dist/ | |
. | |
- name: Publish distribution 📦 to PyPI | |
if: startsWith(github.ref, 'refs/tags') && matrix.python-version == '3.10' | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |