Use poetry
build system, update Python version to ^3.8 to include 3.12+
#3186
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: graspologic Build | |
on: | |
push: | |
paths-ignore: | |
- '.all-contributorsrc' | |
- 'CONTRIBUTORS.md' | |
branches-ignore: | |
- 'dev' | |
- 'main' | |
pull_request: | |
paths-ignore: | |
- '.all-contributorsrc' | |
- 'CONTRIBUTORS.md' | |
workflow_call: | |
jobs: | |
static-code-analysis: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v1 | |
with: | |
languages: 'python' | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v1 | |
build-reference-documentation: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
poetry-version: ["1.8.2"] | |
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 Poetry ${{ matrix.poetry-version }} | |
uses: abatilo/actions-poetry@v3.0.0 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Install dependencies | |
run: poetry install | |
- name: "Run Reference Documentation Generation" | |
run: | | |
echo "documentation" > dependencies_documentation.txt | |
poetry run pipdeptree >> dependencies_documentation.txt | |
poetry run poe docsWithTutorials | |
- name: Archive documentation version artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dependencies | |
path: | | |
dependencies_documentation.txt | |
- name: Archive documentation artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: documentation-site | |
path: | | |
docs/_build/html | |
code-format-check: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
poetry-version: ["1.8.2"] | |
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 Poetry ${{ matrix.poetry-version }} | |
uses: abatilo/actions-poetry@v3.0.0 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Install dependencies | |
run: poetry install | |
- name: Run Format Check | |
run: poetry run poe format_check | |
test-coverage: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
poetry-version: ["1.8.2"] | |
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 Poetry ${{ matrix.poetry-version }} | |
uses: abatilo/actions-poetry@v3.0.0 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Install dependencies | |
run: poetry install | |
- name: Run Test Coverage | |
run: poetry run poe coverage | |
unit-and-doc-test: | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
poetry-version: ["1.8.2"] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{matrix.python_version}} ${{matrix.os}} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{matrix.python_version}} | |
- name: Install Poetry ${{ matrix.poetry-version }} | |
uses: abatilo/actions-poetry@v3.0.0 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Install dependencies | |
run: poetry install | |
- name: Run Unit Tests and Doctests Python ${{matrix.python_version}} ${{matrix.os}} | |
run: poetry run poe tests | |
- name: Run mypy type check Python ${{matrix.python_version}} ${{matrix.os}} | |
run: poetry run poe type_check | |
- name: Generate dependency tree | |
run: | | |
export DEPS='dependencies_${{matrix.python_version}}_${{matrix.os}}.txt' | |
echo "${{matrix.python_version}} ${{matrix.os}}" > $DEPS | |
poetry run pipdeptree >> $DEPS | |
shell: bash | |
- name: Archive dependency tree | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dependencies | |
path: | | |
dependencies_${{matrix.python_version}}_${{matrix.os}}.txt |