@@ -18,47 +18,62 @@ jobs:
1818 matrix :
1919 python-version : ["3.12"]
2020 os : [ubuntu-latest, macOS-latest]
21- env :
22- POETRY_VIRTUALENVS_IN_PROJECT : true
23- steps :
24- - uses : actions/checkout@v3
25- - uses : actions/setup-python@v5
26- with :
27- python-version : ${{ matrix.python-version }}
21+ steps :
22+ - uses : actions/checkout@v4
23+
24+ - name : Install uv
25+ uses : astral-sh/setup-uv@v2
26+
27+ - name : Set up Python
28+ run : uv python install
29+
30+ - name : Install the project
31+ run : uv sync --all-extras --dev
32+
33+ - name : Run tests
34+ # For example, using `pytest`
35+ run : uv run pytest tests
36+ # env:
37+ # POETRY_VIRTUALENVS_IN_PROJECT: true
38+ # steps:
39+ # - uses: actions/checkout@v3
40+ # - uses: actions/setup-python@v5
41+ # with:
42+ # python-version: ${{ matrix.python-version }}
2843
29- # Cache the installation of Poetry itself, e.g. the next step. This prevents the workflow
30- # from installing Poetry every time, which can be slow. Note the use of the Poetry version
31- # number in the cache key, and the "-0" suffix: this allows you to invalidate the cache
32- # manually if/when you want to upgrade Poetry, or if something goes wrong.
33- - name : cache poetry install
34- uses : actions/cache@v4
35- with :
36- path : ~/.local
37- key : poetry-cache-${{ runner.os }}-${{ matrix.python-version }}-${{ env.POETRY_VERSION }}
44+ # # Cache the installation of Poetry itself, e.g. the next step. This prevents the workflow
45+ # # from installing Poetry every time, which can be slow. Note the use of the Poetry version
46+ # # number in the cache key, and the "-0" suffix: this allows you to invalidate the cache
47+ # # manually if/when you want to upgrade Poetry, or if something goes wrong.
48+ # - name: cache poetry install
49+ # uses: actions/cache@v4
50+ # with:
51+ # path: ~/.local
52+ # key: poetry-cache-${{ runner.os }}-${{ matrix.python-version }}-${{ env.POETRY_VERSION }}
3853
39- # Install Poetry. You could do this manually, or there are several actions that do this.
40- # `snok/install-poetry` seems to be minimal yet complete, and really just calls out to
41- # Poetry's default install script, which feels correct. I pin the Poetry version here
42- # because Poetry does occasionally change APIs between versions and I don't want my
43- # actions to break if it does.
44- #
45- # The key configuration value here is `virtualenvs-in-project: true`: this creates the
46- # venv as a `.venv` in your testing directory, which allows the next step to easily
47- # cache it.
48- - uses : snok/install-poetry@v1
49- with :
50- version : 1.8.3
51- virtualenvs-create : true
52- virtualenvs-in-project : true
54+ # # Install Poetry. You could do this manually, or there are several actions that do this.
55+ # # `snok/install-poetry` seems to be minimal yet complete, and really just calls out to
56+ # # Poetry's default install script, which feels correct. I pin the Poetry version here
57+ # # because Poetry does occasionally change APIs between versions and I don't want my
58+ # # actions to break if it does.
59+ # #
60+ # # The key configuration value here is `virtualenvs-in-project: true`: this creates the
61+ # # venv as a `.venv` in your testing directory, which allows the next step to easily
62+ # # cache it.
63+ # - uses: snok/install-poetry@v1
64+ # with:
65+ # version: 1.8.3
66+ # virtualenvs-create: true
67+ # virtualenvs-in-project: true
5368
54- # Cache your dependencies (i.e. all the stuff in your `pyproject.toml`)
55- - name : cache venv
56- uses : actions/cache@v4
57- with :
58- path : .venv
59- key : venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
60- - run : poetry install --no-interaction --no-root
61- if : steps.cache-deps.outputs.cache-hit != 'true'
62- - run : poetry install --no-interaction
63- - run : poetry run ruff check --fix
64- - run : poetry run pytest
69+ # # Cache your dependencies (i.e. all the stuff in your `pyproject.toml`)
70+ # - name: cache venv
71+ # uses: actions/cache@v4
72+ # with:
73+ # path: .venv
74+ # key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
75+ # - run: poetry install --no-interaction --no-root
76+ # if: steps.cache-deps.outputs.cache-hit != 'true'
77+ # - run: poetry install --no-interaction
78+ # - run: poetry run ruff check --fix
79+ # - run: poetry run pytest
0 commit comments