Skip to content

👷 Refactor pylint.yml to remove unused strategy matrix in install job #15

👷 Refactor pylint.yml to remove unused strategy matrix in install job

👷 Refactor pylint.yml to remove unused strategy matrix in install job #15

Workflow file for this run

name: Python CI
on: [push, workflow_dispatch]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Lint Code
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -U pylint pytest
pylint $(git ls-files '*.py')
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Restore Python virtual environment
uses: actions/cache@v2
with:
path: ~/.venv
key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
- name: Run tests
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -U pylint pytest
pytest .