Skip to content

trying matrix

trying matrix #20

Workflow file for this run

name: check lint and format
on: [push, pull_request]
jobs:
lint-web-app:
runs-on: ubuntu-latest
strategy:
matrix:
# repeat same job for each subsystem in the following subdirectories
subdir: [web-app, machine-learning-client]
steps:
- name: Set working directory
run: |
working-directory: ${{ matrix.subdir }}
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10" # update version(s) as needed
- name: Install dependencies
if: ${{ hashFiles('**/*.py') != '' }}
run: |
python -m pip install --upgrade pip
python -m pip install pipenv
pipenv sync --dev --python $(which python)
pipenv shell --fancy --python $(which python)
- name: Lint with pylint
if: ${{ hashFiles('**/*.py') != '' }}
# you may set pylint to ignore any files or dependencies that make no sense to lint
run: |
pwd
pipenv run pylint **/*.py
- name: Format with black
if: ${{ hashFiles('**/*.py') != '' }}
# you may set black to ignore any files or dependencies that make no sense to format
run: |
pwd
pipenv run black --diff --check .