Skip to content

Commit

Permalink
move single-length matrix strategy dimensions to env-vars
Browse files Browse the repository at this point in the history
  • Loading branch information
darthtrevino committed May 22, 2024
1 parent 03b2a64 commit bdc9353
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 30 deletions.
37 changes: 15 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,26 @@ on:
- '.all-contributorsrc'
- 'CONTRIBUTORS.md'
workflow_call:
env:
PYTHON_VERSION: '3.10'
POETRY_VERSION: '1.8.3'
jobs:
build-reference-documentation:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
poetry-version: ["1.8.2"]
steps:
- run: sudo apt-get install -y pandoc
- 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 }}
- name: Install Poetry
uses: abatilo/actions-poetry@v3.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
poetry-version: $POETRY_VERSION
- name: Install dependencies
run: poetry install
- name: "Run Reference Documentation Generation"
Expand All @@ -51,40 +53,32 @@ jobs:
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 }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry ${{ matrix.poetry-version }}
python-version: $PYTHON_VERSION
- name: Install Poetry
uses: abatilo/actions-poetry@v3.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
poetry-version: $POETRY_VERSION
- name: Install dependencies
run: poetry install
- name: Run Format Check
run: poetry run poe static_checks
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 }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry ${{ matrix.poetry-version }}
python-version: $PYTHON_VERSION
- name: Install Poetry
uses: abatilo/actions-poetry@v3.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
poetry-version: $POETRY_VERSION
- name: Install dependencies
run: poetry install
- name: Run Test Coverage
Expand All @@ -95,18 +89,17 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python_version: ["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 }}
- name: Install Poetry
uses: abatilo/actions-poetry@v3.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
poetry-version: $POETRY_VERSION
- name: Install dependencies
run: poetry install
- name: Run Unit Tests and Doctests Python ${{matrix.python_version}} ${{matrix.os}}
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,31 @@ on:
branches:
- 'main'
- 'dev'
env:
PYTHON_VERSION: '3.10'
POETRY_VERSION: '1.8.3'
jobs:
build:
uses: ./.github/workflows/build.yml
publish:
runs-on: ubuntu-latest
needs: build
if: github.ref=='refs/heads/main' || github.ref=='refs/heads/dev'
strategy:
matrix:
python-version: ["3.10"]
poetry-version: ["1.8.2"]
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry ${{ matrix.poetry-version }}
python-version: $PYTHON_VERSION
- name: Install Poetry
uses: abatilo/actions-poetry@v3.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
poetry-version: $POETRY_VERSION
- name: Add poetry-dynamic-versioning plugin
run: poetry self add "poetry-dynamic-versioning[plugin]"
- name: Install dependencies
Expand Down

0 comments on commit bdc9353

Please sign in to comment.