Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 28 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,41 @@ name: Link Status
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-16.04
pre-commit:
name: Pre-Commit Checks
runs-on: ubuntu-latest
steps:
- name: Checkout to master
uses: actions/checkout@master

- name: Setup python
uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'

- name: Pre-Commit Checks
run: |
python -m pip install pre-commit
pre-commit run -a

- name: Analysis (git diff)
if: failure()
run: git diff

tests:
name: Test-${{ matrix.os }}-Py${{ matrix.python-version }}
needs: pre-commit
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [ '3.6', '3.7' ]
name: Python ${{ matrix.python-version }}
steps:
- name: Checkout to master
uses: actions/checkout@master

- name: Setup python
- name: Setup Python-${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -24,25 +48,5 @@ jobs:
python -m pip install .
python -m pip install -Ur dev-requirements.txt

- name: Pre-Commit
run: pre-commit run -a

- name: Analysis (git diff)
if: failure()
run: git diff

- name: Unit Tests
run: py.test tests -v

- name: Build Package
if: matrix.python-version == '3.7' && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
run: |
python -m pip install --upgrade setuptools wheel
python setup.py sdist bdist_wheel

- name: Deploy to PyPi
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_linkstatus }}
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish linkstatus to PyPI

on:
push:
branches:
- master
tags:
- '*'

jobs:
build-and-publish:
name: Build and publish Python 🐍 distributions to PyPI
runs-on: ubuntu-18.04
steps:
- name: Checkout to master
uses: actions/checkout@master

- name: Setup python
uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'

- name: Build Package
run: |
python -m pip install --upgrade setuptools wheel
python setup.py sdist bdist_wheel

- name: Deploy to PyPi
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_linkstatus }}