Skip to content

Commit bbef2dc

Browse files
Merge pull request #98 from romeokienzler/main
add static and dynamic code analysis
2 parents 8231b82 + 6d15c5d commit bbef2dc

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

.github/workflows/crosshair.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Dynamic Code Analysis
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Set up Python 3.11
23+
uses: actions/setup-python@v3
24+
with:
25+
python-version: "3.11"
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install crosshair-tool
30+
pip install -r requirements/required.txt
31+
- name: Test with pytest
32+
run: |
33+
crosshair watch ./terratorch

.github/workflows/pylint.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Static Code Analysis (Pylint)
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10","3.11"]
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install pylint
25+
- name: Analysing the code with pylint
26+
run: |
27+
pylint $(git ls-files '*.py')
28+
pylint $(git ls-files '*.ipynb')

0 commit comments

Comments
 (0)