Skip to content

Commit

Permalink
Can't reuse job contant
Browse files Browse the repository at this point in the history
  • Loading branch information
BSchilperoort committed Nov 18, 2024
1 parent afc0b84 commit 2a3f9f2
Showing 1 changed file with 38 additions and 9 deletions.
47 changes: 38 additions & 9 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ defaults:
jobs:
setup-python:
runs-on: ubuntu-latest
lint-format:
name: formatting and type checking 🔍️
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -41,11 +44,6 @@ jobs:
with:
python-version: "3.13"
cache: "pip"
lint-format:
name: formatting and type checking 🔍️
runs-on: ubuntu-latest
needs: setup-python
steps:
- name: Install ruff
run: pip install ruff
- name: Run ruff check
Expand All @@ -54,8 +52,14 @@ jobs:
run: ruff format --check
typing:
runs-on: ubuntu-latest
needs: setup-python
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
- name: Install remotebmi
run: pip install .[dev] # dev too so tests can be type checked
- name: Install mypy
Expand All @@ -72,15 +76,28 @@ jobs:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.10', '3.13']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: pip install -e .[dev]
- name: Run tests
run: pytest
cov:
name: compute and upload coverage
runs-on: ubuntu-latest
needs: setup-python
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
- name: Install dependencies
run: pip install -e .[dev]
- name: Run tests
Expand All @@ -93,17 +110,29 @@ jobs:
build:
name: build the package 🛠️
runs-on: ubuntu-latest
needs: setup-python
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
- name: Install build
run: pip install build
- name: Build package
run: python3 -m build
docs:
name: build docs 📖
runs-on: ubuntu-latest
needs: setup-python
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
- name: Install docs requirements
run: pip install -r docs/requirements.txt
- name: Build docs
Expand Down

0 comments on commit 2a3f9f2

Please sign in to comment.