Skip to content

Commit

Permalink
feat: ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
achains committed Sep 2, 2023
1 parent 417809b commit f57dd07
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and publish

on: [push, pull_request, workflow_dispatch]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: actions/checkout@v2

- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Check code style with Black
run: |
pre-commit install
pre-commit run --all-files --color always --verbose --show-diff-on-failure
- name: Test with pytest
run: scripts/run_tests.sh

- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
poetry version $(git describe --tags --abbrev=0)
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish --build

0 comments on commit f57dd07

Please sign in to comment.