Skip to content

Commit

Permalink
ci: migrate to GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Apr 8, 2021
1 parent 21162e6 commit fc01990
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 30 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Checks

on:
push:
pull_request:
schedule:
- cron: "0 0 1 * *"

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8']
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
# prerequisites
python -m pip install --upgrade pip wheel
python -m pip install codecov coverage flake8 pytest
# install dependencies
pip install -e .
# show installed packages
pip freeze
- name: Test with pytest
run: |
coverage run --source=qpformat -m pytest tests
- name: Lint with flake8
run: |
flake8 .
- name: Submit code coverage
run: |
coverage report -m
codecov
29 changes: 29 additions & 0 deletions .github/workflows/deploy_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release to PyPI

on:
push:
tags:
- '*'

jobs:
deploy:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install -e .
- name: Build and publish
env:
TWINE_USERNAME: ci_qpi
TWINE_PASSWORD: ${{ secrets.PYPI_PWD }}
run: |
python setup.py sdist bdist_wheel
twine upload --skip-existing dist/*
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,5 @@ _version_save.py
examples/*.tif
examples/*.hdf5
.pytest_cache

.idea
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
0.10.7
- ci: migrate to GHA
0.10.6
- maintenance release
0.10.5
Expand Down

0 comments on commit fc01990

Please sign in to comment.