Skip to content

Commit

Permalink
Migrate CI to Github Actions (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickw444 committed Nov 23, 2021
1 parent bcc68de commit f1f3a35
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 118 deletions.
110 changes: 110 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
on:
push:
schedule:
- cron: '0 3 * * 6'

jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: 'Install Dependencies'
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: 'Lint'
run: tox
env:
TOXENV: 'lint'

docs:
name: "Build Docs"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: 'Install Dependencies'
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: 'Build Docs'
run: tox
env:
TOXENV: 'docs'

test:
name: "Test"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [pypy3, 3.5, 3.6, 3.7, 3.8, 3.9]
include:
- python-version: pypy3
toxenv: pypy3
- python-version: 3.5
toxenv: py35
- python-version: 3.6
toxenv: py36
- python-version: 3.7
toxenv: py37
- python-version: 3.8
toxenv: py38
- python-version: 3.9
toxenv: py39

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: 'Install Dependencies'
run: |
python -m pip install --upgrade pip
python -m pip install tox wheel
- name: 'Run Tests (with coverage)'
run: tox
env:
TOXENV: ${{ matrix.toxenv }}
- uses: codecov/codecov-action@v2
if: ${{ matrix.python-version == '3.9' }}
- name: "Build Package 📦"
run: |
git describe --tags --exact-match > VERSION || true
python setup.py sdist bdist_wheel
- uses: actions/upload-artifact@v2
# Only publish artifacts from Python latest build.
if: ${{ matrix.python-version == '3.9' }}
with:
name: dist
path: dist/
if-no-files-found: error

release:
name: "Release 🚀"
runs-on: ubuntu-latest
needs:
- test
- docs
- lint
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v2
with:
name: dist
path: dist/
- name: Release to PyPi 📦
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Create Github Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Flask-LDAP3-Login
============================================

.. image:: https://travis-ci.org/nickw444/flask-ldap3-login.svg?branch=master
:target: https://travis-ci.org/nickw444/flask-ldap3-login
.. image:: https://github.com/nickw444/flask-ldap3-login/actions/workflows/workflow.yaml/badge.svg
:target: https://github.com/nickw444/flask-ldap3-login/actions/workflows/workflow.yaml

.. image:: https://coveralls.io/repos/nickw444/flask-ldap3-login/badge.svg
:target: https://coveralls.io/r/nickw444/flask-ldap3-login
Expand Down
115 changes: 0 additions & 115 deletions azure-pipelines.yml

This file was deleted.

2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py35,py36,py37,py38,pypy3,lint,docs
envlist = py35,py36,py37,py38,py39,pypy3,lint,docs

[isort]
multi_line_output=3
Expand Down

0 comments on commit f1f3a35

Please sign in to comment.