fix: move dev dependencies to dev group #1066
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
# Make sure commit messages follow the conventional commits convention: | |
# https://www.conventionalcommits.org | |
commitlint: | |
name: Lint commit messages | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: wagoid/[email protected] | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- "3.13" | |
os: | |
- ubuntu-24.04 | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: snok/[email protected] | |
- name: Install dependencies | |
run: poetry install | |
shell: bash | |
- name: Test with PyTest | |
run: poetry run pytest --cov-report=xml | |
shell: bash | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
env_vars: OS, PYTHON_VERSION | |
verbose: true | |
release: | |
runs-on: ubuntu-24.04 | |
environment: | |
name: release | |
url: https://pypi.org/project/aiolifx-themes/ | |
if: github.ref == 'refs/heads/main' | |
concurrency: release | |
permissions: | |
id-token: write | |
contents: write | |
needs: | |
- test | |
- commitlint | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
- name: Install Poetry | |
uses: snok/[email protected] | |
- name: Install dependencies using Poetry | |
run: poetry install | |
shell: bash | |
- name: Run Python Semantic Release | |
id: release | |
uses: python-semantic-release/[email protected] | |
with: | |
github_token: ${{ secrets.GH_TOKEN }} | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: steps.release.outputs.released == 'true' | |
with: | |
verbose: true | |
print-hash: true | |
- name: Publish package distributions to GitHub Releases | |
uses: python-semantic-release/upload-to-gh-release@main | |
if: steps.release.outputs.released == 'true' | |
with: | |
github_token: ${{ secrets.GH_TOKEN }} | |
tag: ${{ steps.release.outputs.tag }} |