Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

chore(deps): update github actions #345

chore(deps): update github actions

chore(deps): update github actions #345

---
name: Python package
# yamllint disable-line rule:truthy
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- name: Set up Python ${{ matrix.python-version }}
# yamllint disable-line rule:comments
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Test with pytest
run: |
pip install -e ".[test]"
pytest tests --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
- name: Upload pytest test results
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
flake8-lint:
runs-on: ubuntu-latest
name: Lint with Flake8
steps:
- name: Check out source repository
# yamllint disable-line rule:comments
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Set up Python environment
# yamllint disable-line rule:comments
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
with:
python-version: "3.11"
- name: flake8 Lint
uses: py-actions/flake8@84ec6726560b6d5bd68f2a5bed83d62b52bb50ba # v2
ruff-lint:
runs-on: ubuntu-latest
name: Lint with Ruff
steps:
- name: Check out source repository
# yamllint disable-line rule:comments
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Set up Python environment
# yamllint disable-line rule:comments
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
with:
python-version: "3.11"
- name: Ruff Lint
run: |
pip install -e ".[pipeline]"
# default set of ruff rules with GitHub Annotations
ruff --output-format=github --target-version=py310 src/