Skip to content

Merge pull request #82 from macauff/hsc_test_fixes #2

Merge pull request #82 from macauff/hsc_test_fixes

Merge pull request #82 from macauff/hsc_test_fixes #2

Workflow file for this run

# This workflow will install Python dependencies, then perform static linting analysis.
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Run linter
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Linux, Python 3.11
os: ubuntu-22.04
python-version: "3.11"
toxenv: py311-test
gfortran-version: 11
- name: macOS, Python 3.10
os: macOS-11
python-version: "3.10"
gfortran-version: 11
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- if: runner.os == 'macOS'
name: macOS gfortran
run: |
sudo ln -s /usr/local/bin/gfortran-${{ matrix.gfortran-version }} /usr/local/bin/gfortran
sudo mkdir /usr/local/gfortran
sudo ln -s /usr/local/Cellar/gcc@${{ matrix.gfortran-version }}/*/lib/gcc/${{ matrix.gfortran-version }} /usr/local/gfortran/lib
- if: runner.os == 'Linux'
name: ubuntu gfortran
run: sudo ln -sf /usr/bin/gfortran-${{ matrix.gfortran-version }} /usr/bin/gfortran
- name: Install dependencies
run: |
# sudo apt-get update
python -m pip install --upgrade pip
pip install .[dev]
- name: Analyze src code with linter
run: |
pylint -rn -sn --recursive=y ./src --rcfile=./src/.pylintrc
- name: Analyze tests code with linter
if: success() || failure()
run: |
pylint -rn -sn --recursive=y ./tests --rcfile=./tests/.pylintrc
- name: Analyze benchmarks code with linter
if: success() || failure()
run: |
pylint -rn -sn --recursive=y ./benchmarks --rcfile=./tests/.pylintrc