-
Notifications
You must be signed in to change notification settings - Fork 72
58 lines (47 loc) · 1.28 KB
/
lint.yml
File metadata and controls
58 lines (47 loc) · 1.28 KB
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
47
48
49
50
51
52
53
54
55
56
57
name: linter
on: [push]
jobs:
ruff:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Update apt cache
run: |
sudo apt-get update || sudo apt-get update --fix-missing
- name: System Dependencies
run: |
sudo apt install -y build-essential \
libcairo2-dev \
pkg-config \
python3-dev \
python3-openssl
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: |
python -m pip install --upgrade uv
uv --version
- name: Cache uv downloads
uses: actions/cache@v3
with:
path: ~/.cache/uv
key: ${{ runner.os }}-uv-${{ hashFiles('pip/*.txt') }}
restore-keys: |
${{ runner.os }}-uv-
- name: Create venv
run: |
uv venv .venv
- name: Install ruff
run: |
. .venv/bin/activate
uv pip install ruff
- name: Lint with ruff
run: |
# Check all lint rules
. .venv/bin/activate
ruff check atomsci/