Skip to content

Commit

Permalink
ci: add github actions config
Browse files Browse the repository at this point in the history
  • Loading branch information
yagebu committed Jan 9, 2022
1 parent 8ee73ed commit 6967bb1
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Upload Python Package on tags

on:
push:
tags:
- '*'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
- name: Install dependencies
run: python -m pip install tox twine
- name: Build release artefacts
run: tox -e build-dist
- name: Publish release
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m twine upload dist/*
35 changes: 35 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Linux tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
linux-py:
name: Linux py${{ matrix.python }} tests
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-py-${{ matrix.python }}-pip-${{ hashFiles('**/setup.py') }}
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install python dependencies
run: python -m pip install tox codecov
- name: Run python tests
run: tox
- name: Run pre commit checks
uses: pre-commit/[email protected]

0 comments on commit 6967bb1

Please sign in to comment.