Skip to content

Commit

Permalink
use matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
DasBasti committed Feb 4, 2024
1 parent 4b142c0 commit 4bc7124
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,23 @@ on:
schedule:
- cron: "0 0 * * *"

env:
DEFAULT_PYTHON: 3.9

jobs:
pre-commit:
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
name: Pre-commit
steps:
- name: Check out the repository
uses: actions/checkout@v2.3.4

- name: Set up Python "${{ env.DEFAULT_PYTHON }}"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2.2.1
with:
python-version: "${{ env.DEFAULT_PYTHON }}"
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
run: |
Expand All @@ -41,6 +43,10 @@ jobs:
hacs:
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
name: HACS
steps:
- name: Check out the repository
Expand All @@ -53,6 +59,10 @@ jobs:
ignore: brands

hassfest:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: "ubuntu-latest"
name: Hassfest
steps:
Expand All @@ -63,15 +73,19 @@ jobs:
uses: "home-assistant/actions/hassfest@master"

tests:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: "ubuntu-latest"
name: Run tests
steps:
- name: Check out code from GitHub
uses: "actions/checkout@v2.3.4"
- name: Setup Python "${{ env.DEFAULT_PYTHON }}"
- name: Setup Python ${{ matrix.python-version }}
uses: "actions/setup-python@v2.2.1"
with:
python-version: "${{ env.DEFAULT_PYTHON }}"
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: |
pip install --constraint=.github/workflows/constraints.txt pip
Expand Down

0 comments on commit 4bc7124

Please sign in to comment.