Skip to content

Commit e758da3

Browse files
committed
update ci
1 parent baf1e33 commit e758da3

File tree

5 files changed

+599
-71
lines changed

5 files changed

+599
-71
lines changed

.github/workflows/lint.yml

+8-21
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,13 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v4
1414

15+
- name: Install poetry
16+
run: python -m pip install poetry
17+
1518
- uses: actions/setup-python@v4
1619
with:
1720
python-version: '3.11'
18-
19-
- name: Install poetry
20-
run: |
21-
python -m pip install --upgrade pip
22-
pip install poetry
23-
poetry config virtualenvs.in-project true
24-
25-
- name: Set up cache
26-
uses: actions/cache@v3
27-
id: cache
28-
with:
29-
path: .venv
30-
key: venv-lint-${{ hashFiles('**/poetry.lock') }}
31-
32-
- name: Ensure cache is healthy
33-
if: steps.cache.outputs.cache-hit == 'true'
34-
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
21+
cache: "poetry"
3522

3623
- name: Install dependencies
3724
run: poetry install
@@ -42,8 +29,8 @@ jobs:
4229
- name: Type-check with Pyright
4330
run: poetry run pyright .
4431

45-
- name: Check format with Black
46-
run: poetry run black --check --diff .
47-
4832
- name: Lint with ruff
49-
run: poetry run ruff --format=github .
33+
run: poetry run ruff check --output-format=github .
34+
35+
- name: Format with ruff
36+
run: poetry run ruff format .

.github/workflows/test.yml

+5-18
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,22 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [Ubuntu]
12-
python-version: ['3.10', '3.8']
12+
python-version: ['3.11', '3.8']
1313
env:
1414
OS: ${{ matrix.os }}
1515
PYTHON: ${{ matrix.python-version }}
1616

1717
steps:
1818
- uses: actions/checkout@v4
1919

20+
- name: Install poetry
21+
run: python -m pip install poetry
22+
2023
- name: Set up Python ${{ matrix.python-version }}
2124
uses: actions/setup-python@v4
2225
with:
2326
python-version: ${{ matrix.python-version }}
24-
25-
- name: Install poetry
26-
run: |
27-
python -m pip install --upgrade pip
28-
pip install poetry
29-
poetry config virtualenvs.in-project true
30-
31-
- name: Set up cache
32-
uses: actions/cache@v3
33-
id: cache
34-
with:
35-
path: .venv
36-
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
37-
38-
- name: Ensure cache is healthy
39-
if: steps.cache.outputs.cache-hit == 'true'
40-
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
27+
cache: "poetry"
4128

4229
- name: Install dependencies
4330
run: poetry install

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ ipython_config.py
109109
# This is especially recommended for binary packages to ensure reproducibility, and is more
110110
# commonly ignored for libraries.
111111
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
112-
poetry.lock
112+
# poetry.lock
113113

114114
# pdm
115115
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.

.pre-commit-config.yaml

-31
This file was deleted.

0 commit comments

Comments
 (0)