-
Notifications
You must be signed in to change notification settings - Fork 13
46 lines (40 loc) · 1.38 KB
/
code_checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: code-checks
# Controls when the workflow will run
on:
# Triggers the workflow on push events
push:
branches: [ 'main' ]
tags-ignore: [ '**' ]
# Triggers the workflow on pull request events
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
code_checks:
name: code checks
runs-on: ubuntu-latest
strategy:
fail-fast: false # false: try to complete all jobs
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[tests,examples] ./transformations ./lint_rules
pip list
- name: Add pylint annotator
uses: pr-annotators/[email protected]
- name: Analysing the code with pylint
run: |
pylint --rcfile=.pylintrc loki tests
pushd transformations && pylint --rcfile=../.pylintrc transformations tests; popd
pushd lint_rules && pylint --rcfile=../.pylintrc lint_rules tests; popd
jupyter nbconvert --to=script --output-dir=example_converted example/*.ipynb
pylint --rcfile=.pylintrc_ipynb example_converted/*.py