Skip to content

run pre-commit

run pre-commit #886

Workflow file for this run

name: linting
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: linting
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
# Bookend python versions
python-version: ["3.9"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Create conda environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: pyremo-linting
micromamba-version: 'latest'
environment-file: ci/requirements/environment.yml
extra-specs: |
python=${{ matrix.python-version }}
black
isort
flake8
channels: conda-forge
- name: Install pyremo
run: |
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
- name: Import pyremo
run: |
python -c "import pyremo"
- name: isort
run: isort --check .
- name: black
if: always()
run: black --check .
- name: flake8
if: always()
run: flake8 .