@@ -14,36 +14,33 @@ jobs:
14
14
path : ~/.cache/pip
15
15
key : ${{ runner.os }}-pip
16
16
restore-keys : ${{ runner.os }}-pip
17
- - name : Install Poetry
18
- uses : snok/install-poetry@v1.1.1
17
+ - name : Install uv
18
+ uses : astral-sh/setup-uv@v2
19
19
with :
20
20
virtualenvs-create : true
21
21
virtualenvs-in-project : true
22
22
# virtualenvs-path: ~/.venv
23
23
- name : Load cached venv
24
- id : cached-poetry -dependencies
24
+ id : cached-uv -dependencies
25
25
uses : actions/cache@v2
26
26
with :
27
27
path : .venv
28
- key : venv-${{ runner.os }}-${{ hashFiles('**/poetry .lock') }}
28
+ key : venv-${{ runner.os }}-${{ hashFiles('**/uv .lock') }}
29
29
# install dependencies if cache does not exist
30
30
- name : Check cache and install dependencies
31
- run : poetry install
32
- if : steps.cached-poetry -dependencies.outputs.cache-hit != 'true'
31
+ run : uv sync --all-extras --dev
32
+ if : steps.cached-uv -dependencies.outputs.cache-hit != 'true'
33
33
- name : Run linters
34
34
run : |
35
- source .venv/bin/activate
36
- flake8 .
37
- black . --check
38
- isort .
35
+ uv run pre-commit run --all-files
39
36
40
37
test :
41
38
needs : linting
42
39
strategy :
43
40
fail-fast : true
44
41
matrix :
45
42
os : [ "ubuntu-latest", "macos-latest" ]
46
- python-version : [ "3.6 ", "3.7 ", "3.8 ", "3.9 " ]
43
+ python-version : [ "3.8 ", "3.9 ", "3.10 ", "3.11", "3.12 " ]
47
44
runs-on : ${{ matrix.os }}
48
45
steps :
49
46
- name : Check out repository
@@ -52,28 +49,28 @@ jobs:
52
49
uses : actions/setup-python@v2
53
50
with :
54
51
python-version : ${{ matrix.python-version }}
55
- - name : Install Poetry
56
- uses : snok/install-poetry@v1.1.1
52
+ - name : Install uv
53
+ uses : astral-sh/setup-uv@v2
57
54
with :
58
55
virtualenvs-create : true
59
56
virtualenvs-in-project : true
60
57
- name : Load cached venv
61
- id : cached-poetry -dependencies
58
+ id : cached-uv -dependencies
62
59
uses : actions/cache@v2
63
60
with :
64
61
path : .venv
65
- key : venv-${{ runner.os }}-${{ hashFiles('**/poetry .lock') }}
62
+ key : venv-${{ runner.os }}-${{ hashFiles('**/uv .lock') }}
66
63
# install dependencies if cache does not exist
67
64
- name : Check cache and install dependencies
68
- run : poetry install
69
- if : steps.cached-poetry -dependencies.outputs.cache-hit != 'true'
65
+ run : uv sync --all-extras --dev
66
+ if : steps.cached-uv -dependencies.outputs.cache-hit != 'true'
70
67
- name : Run tests
71
68
run : |
72
- poetry run pytest tests/ --cov="pymdgen" --cov-report=xml --cov-report=term-missing
73
- poetry run coverage report
69
+ uv run tox
74
70
# upload coverage stats
75
71
- name : Upload coverage
76
72
uses : codecov/codecov-action@v1
77
73
with :
78
74
file : ./coverage.xml
79
75
fail_ci_if_error : true
76
+ token : ${{ secrets.CODECOV_TOKEN }}
0 commit comments