Skip to content

Commit

Permalink
Move single-length matrix strategy dimensions to env-vars (#1082)
Browse files Browse the repository at this point in the history
* move single-length matrix strategy dimensions to env-vars

* update python version usage
  • Loading branch information
darthtrevino authored May 22, 2024
1 parent 03b2a64 commit 9c05ab5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 35 deletions.
46 changes: 19 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,25 @@ 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 }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry ${{ matrix.poetry-version }}
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: abatilo/[email protected]
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 +52,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: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: abatilo/[email protected]
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: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
poetry-version: $POETRY_VERSION
- name: Install dependencies
run: poetry install
- name: Run Test Coverage
Expand All @@ -95,18 +88,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/[email protected]
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: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: abatilo/[email protected]
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 9c05ab5

Please sign in to comment.