-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (33 loc) · 1.19 KB
/
linting-and-tests.yaml
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
name: Run linting and unit tests
on:
pull_request:
jobs:
linting_and_tests:
name: Linting and Tests | python=${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}
conda-channels: anaconda, conda-forge
- name: Conda install dependencies
run: conda install -c conda-forge pyproj==3.6.0
- name: Install dependencies
run: |
python${{ matrix.python-version }} -m pip install --upgrade pip
python${{ matrix.python-version }} -m pip install --force-reinstall -e ".[dev]"
- name: Lint with black
run: |
python${{ matrix.python-version }} -m black --check .
- name: Lint with ruff
run: |
python${{ matrix.python-version }} -m ruff -v .
- name: Test with pytest and generate coverage report
run: |
python${{ matrix.python-version }} -m coverage run --source=src/coordinate_transformation_api -m pytest -v tests