Switch to github CI
This commit is contained in:
parent
46f69a8911
commit
7fe6520575
7 changed files with 147 additions and 104 deletions
63
.github/workflows/main.yml
vendored
Normal file
63
.github/workflows/main.yml
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
# see https://github.com/karlicoss/pymplate for up-to-date reference
|
||||
|
||||
name: CI
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.6, 3.7, 3.8]
|
||||
# TODO shit. matrix is going to prevent from twine deployments because of version conflicts??
|
||||
# add 'and' clause??
|
||||
|
||||
steps:
|
||||
# fuck me. https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
|
||||
- run: echo "::add-path::$HOME/.local/bin"
|
||||
|
||||
- uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
# uncomment for SSH debugging
|
||||
# - uses: mxschmitt/action-tmate@v2
|
||||
|
||||
- run: scripts/ci/run
|
||||
|
||||
pypi:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- run: echo "::add-path::$HOME/.local/bin"
|
||||
|
||||
- uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: 'release to test pypi'
|
||||
# always deploy merged master to test pypi
|
||||
if: github.event.ref == 'refs/heads/master'
|
||||
env:
|
||||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD_TEST }}
|
||||
run: pip3 install --user wheel twine && scripts/release --test
|
||||
|
||||
- name: 'release to pypi'
|
||||
# always deploy tags to release pypi
|
||||
# TODO filter release tags only?
|
||||
if: startsWith(github.event.ref, 'refs/tags')
|
||||
env:
|
||||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
|
||||
run: pip3 install --user wheel twine && scripts/release
|
||||
|
||||
# todo generate mypy coverage artifacts?
|
Loading…
Add table
Add a link
Reference in a new issue