Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🤖 improve CI #5

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/check.yml → .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
name: QA & Tests

on:
workflow_dispatch:
push:
release:
types:
- created
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
Expand Down Expand Up @@ -76,3 +88,38 @@ jobs:
run: poetry install --all-extras --sync
- name: Run pre-commit hooks
run: pre-commit run --all-files

qa_success:
name: QA Success
needs: [ test, lint ]
runs-on: ubuntu-latest
steps:
- name: Success
run: echo "QA Succeeded!"

publish:
needs: qa_success
if: contains(github.ref, 'refs/tags/')
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: actions/checkout@v2
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.2
virtualenvs-create: false
virtualenvs-in-project: false
installer-parallel: true
- name: Install poetry-dynamic-versioning
run: poetry self add poetry-dynamic-versioning@1.2.0
- name: Publish to PyPI
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build
38 changes: 0 additions & 38 deletions .github/workflows/release.yml

This file was deleted.