Browse Source

add build job to test install of wheels (#5)

* add build job to test install of wheels

* remove architecture variant

* test we can import the module after install

* install poetry ourselves
pull/6/head
Brett Langdon 5 years ago
committed by GitHub
parent
commit
d347f7499e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 5 deletions
  1. +24
    -2
      .github/workflows/build.yml
  2. +3
    -3
      .github/workflows/test.yml

+ 24
- 2
.github/workflows/build.yml View File

@ -36,7 +36,7 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: Gr1N/setup-poetry@v4
- run: pip install "poetry~=1.1.4"
- run: poetry check
- run: poetry install
- run: poetry build --format sdist
@ -45,8 +45,30 @@ jobs:
name: wheelhouse
path: ./dist/*.tar.gz
upload_pypi:
test_install:
name: Test install on ${{ matrix.os }} / ${{ matrix.python-version }}
needs: [build_wheels, build_sdist]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy-2.7", "pypy-3.6", "pypy-3.7"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@v2
with:
name: wheelhouse
path: dist
- run: pip install --no-index --find-links=./dist sysaudit
name: Install sysaudit from wheels
- run: python -c "import sysaudit; sysaudit.audit('event')"
name: Check module is importable
upload_pypi:
needs: [test_install]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:


+ 3
- 3
.github/workflows/test.yml View File

@ -22,7 +22,7 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- uses: Gr1N/setup-poetry@v4
- run: pip install "poetry~=1.1.4"
- run: poetry install
- run: poetry run mypy --py2 sysaudit/ tests/
name: Mypy Check Python2
@ -38,7 +38,7 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v4
- run: pip install "poetry~=1.1.4"
- run: poetry check
- run: poetry install
- run: poetry run pytest tests/
@ -50,7 +50,7 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- uses: Gr1N/setup-poetry@v4
- run: pip install "poetry~=1.1.4"
- run: poetry install
- run: poetry run sphinx-build -a -W -n -E docs/ docs/_build
- uses: actions/upload-artifact@v2


Loading…
Cancel
Save