|
15 | 15 | - '!contrib/**'
|
16 | 16 |
|
17 | 17 | jobs:
|
18 |
| - pylint: |
| 18 | + lint: |
19 | 19 | runs-on: ubuntu-latest
|
20 | 20 | strategy:
|
21 | 21 | matrix:
|
22 |
| - python-version: ["3.10"] |
23 |
| - name: Pylint |
24 |
| - steps: |
25 |
| - - name: checkout git |
26 |
| - uses: actions/checkout@v4 |
27 |
| - with: |
28 |
| - fetch-depth: 0 |
29 |
| - - name: Setup conda |
30 |
| - uses: s-weigand/setup-conda@v1 |
31 |
| - with: |
32 |
| - update-conda: true |
33 |
| - python-version: ${{ matrix.python-version }} |
34 |
| - conda-channels: anaconda, conda-forge |
35 |
| - - name: run pylint |
36 |
| - run: | |
37 |
| - sudo apt-get remove python3-openssl |
38 |
| - pip install --upgrade -e '.[test]' |
39 |
| - pip install pylint>3.2 |
40 |
| - pylint -j 2 --reports no datacube |
41 |
| - |
| 22 | + python-version: ["3.12"] |
| 23 | + lint-command: |
| 24 | + - "pylint --j 2 --reports no datacube" |
| 25 | + - "--group types mypy datacube" |
| 26 | + - "pycodestyle tests integration_tests examples --max-line-length 120" |
42 | 27 |
|
43 |
| - mypy: |
44 |
| - runs-on: ubuntu-latest |
45 |
| - strategy: |
46 |
| - matrix: |
47 |
| - python-version: ["3.10"] |
48 |
| - name: MyPy |
| 28 | + name: Code Lint |
49 | 29 | steps:
|
50 | 30 | - name: checkout git
|
51 | 31 | uses: actions/checkout@v4
|
52 | 32 | with:
|
53 | 33 | fetch-depth: 0
|
54 |
| - - name: Setup conda |
55 |
| - uses: s-weigand/setup-conda@v1 |
| 34 | + - name: Install uv |
| 35 | + uses: astral-sh/setup-uv@v2 |
56 | 36 | with:
|
57 |
| - update-conda: true |
58 |
| - python-version: ${{ matrix.python-version }} |
59 |
| - conda-channels: anaconda, conda-forge |
60 |
| - - name: run mypy |
| 37 | + version: 0.5.5 |
| 38 | + enable-cache: 'true' |
| 39 | + cache-suffix: ${{ matrix.python-version }} |
| 40 | + - name: Run ${{ matrix.lint-command }} |
61 | 41 | run: |
|
62 |
| - sudo apt-get remove python3-openssl |
63 |
| - pip install --upgrade -e '.[types]' |
64 |
| - mypy datacube |
65 |
| -
|
| 42 | + uv run ${{ matrix.lint-command }} |
66 | 43 |
|
67 |
| - pycodestyle: |
68 |
| - name: pycodestyle |
69 |
| - runs-on: ubuntu-latest |
70 |
| - strategy: |
71 |
| - matrix: |
72 |
| - python-version: ["3.10"] |
73 |
| - steps: |
74 |
| - - name: Checkout |
75 |
| - uses: actions/checkout@v4 |
76 |
| - - name: Setup conda |
77 |
| - uses: s-weigand/setup-conda@v1 |
78 |
| - with: |
79 |
| - update-conda: true |
80 |
| - python-version: ${{ matrix.python-version }} |
81 |
| - conda-channels: anaconda, conda-forge |
82 |
| - - name: Run pycodestyle |
83 |
| - run: | |
84 |
| - sudo apt-get remove python3-openssl |
85 |
| - pip install --upgrade -e '.[test]' |
86 |
| - pycodestyle tests integration_tests examples --max-line-length 120 |
0 commit comments