Skip to content

refactor(ci-cd): CI on both supported Python versions #85

refactor(ci-cd): CI on both supported Python versions

refactor(ci-cd): CI on both supported Python versions #85

Workflow file for this run

name: CI
on:
pull_request:
env:
# Reference: https://github.com/home-assistant/architecture/blob/master/adr/0002-minimum-supported-python-version.md
SUPPORTED_PYTHON_VERSIONS: "['3.11', '3.12']"
jobs:
test:
strategy:
matrix:
python-version: ${{ fromJson(env.SUPPORTED_PYTHON_VERSIONS) }}

Check failure on line 14 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 14, Col: 25): Unrecognized named-value: 'env'. Located at position 10 within expression: fromJson(env.SUPPORTED_PYTHON_VERSIONS) .github/workflows/ci.yml (Line: 14, Col: 25): Unexpected value '${{ fromJson(env.SUPPORTED_PYTHON_VERSIONS) }}'
name: Run tests on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- uses: snok/install-poetry@v1
- name: Install Dependencies
run: poetry install
- name: Run tests
run: poetry run pytest
lint:
strategy:
matrix:
python-version: ${{ fromJson(env.SUPPORTED_PYTHON_VERSIONS) }}
name: Lint code on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- uses: snok/install-poetry@v1
- name: Install Dependencies
run: poetry install
- name: Run linters
run: poetry run make lint