Browse Source

Refactor GitHub actions (#7)

* Refactor GitHub actions

* add missing dependent job

* rename and add badge

* fix broken rst image
pull/8/head
Brett Langdon 5 years ago
committed by GitHub
parent
commit
a9afb202ff
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 60 additions and 66 deletions
  1. +56
    -1
      .github/workflows/build.yml
  2. +0
    -65
      .github/workflows/test.yml
  3. +4
    -0
      README.rst

+ 56
- 1
.github/workflows/build.yml View File

@ -9,6 +9,61 @@ on:
- "v*"
jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Black Check
uses: jpetrucciani/black-check@20.8b1
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- run: pip install "poetry~=1.1.4"
- run: poetry config experimental.new-installer false
name: Disable new installer
- run: poetry install
- run: poetry run mypy --py2 sysaudit/ tests/
name: Mypy Check Python2
- run: poetry run mypy sysaudit/ tests/
name: Mypy Check Python3
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- run: pip install "poetry~=1.1.4"
- run: poetry config experimental.new-installer false
name: Disable new installer
- run: poetry check
- run: poetry install
- run: poetry run pytest tests/
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- run: pip install "poetry~=1.1.4"
- run: poetry config experimental.new-installer false
name: Disable new installer
- run: poetry install
- run: poetry run sphinx-build -a -W -n -E docs/ docs/_build
- uses: actions/upload-artifact@v2
with:
name: docs
path: ./docs/_build/
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
@ -49,7 +104,7 @@ jobs:
test_install:
name: Test install on ${{ matrix.os }} / ${{ matrix.python-version }}
needs: [build_wheels, build_sdist]
needs: [black, mypy, docs, test, build_wheels, build_sdist]
runs-on: ${{ matrix.os }}
strategy:
matrix:


+ 0
- 65
.github/workflows/test.yml View File

@ -1,65 +0,0 @@
name: Test
on:
pull_request:
push:
branches:
- "main"
tags:
- "v*"
jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Black Check
uses: jpetrucciani/black-check@20.8b1
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- run: pip install "poetry~=1.1.4"
- run: poetry config experimental.new-installer false
name: Disable new installer
- run: poetry install
- run: poetry run mypy --py2 sysaudit/ tests/
name: Mypy Check Python2
- run: poetry run mypy sysaudit/ tests/
name: Mypy Check Python3
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- run: pip install "poetry~=1.1.4"
- run: poetry config experimental.new-installer false
name: Disable new installer
- run: poetry check
- run: poetry install
- run: poetry run pytest tests/
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- run: pip install "poetry~=1.1.4"
- run: poetry config experimental.new-installer false
name: Disable new installer
- run: poetry install
- run: poetry run sphinx-build -a -W -n -E docs/ docs/_build
- uses: actions/upload-artifact@v2
with:
name: docs
path: ./docs/_build/

+ 4
- 0
README.rst View File

@ -4,6 +4,10 @@ sysaudit
:target: https://sysaudit.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://github.com/brettlangdon/sysaudit/workflows/Build/badge.svg?branch=main&event=push
:target: https://github.com/brettlangdon/sysaudit/actions?query=branch%3Amain+workflow%3ABuild+event%3Apush
:alt: Build status
Backport module of `sys.audit <https://docs.python.org/3.8/library/sys.html#sys.audit>`_
and `sys.addaudithook <https://docs.python.org/3.8/library/sys.html#sys.addaudithook>`_
from Python 3.8.


Loading…
Cancel
Save