Skip to content

Commit

Permalink
Merge pull request #10 from henryiii/henryiii/ci/faster
Browse files Browse the repository at this point in the history
ci: try using uv
  • Loading branch information
sirosen authored Oct 30, 2024
2 parents 318c88e + 87968af commit dd53ef7
Showing 1 changed file with 7 additions and 34 deletions.
41 changes: 7 additions & 34 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: get date for caching
run: /bin/date -u "+%U" > cachedate.txt
shell: bash

- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.py }}"
cache: "pip"
cache-dependency-path: |
.github/workflows/build.yaml
pyproject.toml
tox.ini
cachedate.txt

- run: python -m pip install tox
- uses: astral-sh/setup-uv@v3

- run: uv tool install tox --with tox-uv

- run: python -m tox run -e "${{ matrix.toxenv }}"
- run: tox run -e "${{ matrix.toxenv }}"

ci-test-matrix:
strategy:
Expand All @@ -42,10 +34,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: get date for caching
run: /bin/date -u "+%U" > cachedate.txt
shell: bash

- uses: actions/setup-python@v5
id: setup-python
with:
Expand All @@ -56,25 +44,10 @@ jobs:
3.11
3.12
3.13
cache: "pip"
cache-dependency-path: |
.github/workflows/build.yaml
pyproject.toml
tox.ini
cachedate.txt
- run: python -m pip install tox
- uses: astral-sh/setup-uv@v3

- name: cache tox virtualenvs
uses: actions/cache@v4
with:
path: .tox
key: >
tox
os=${{ runner.os }}
python=${{ steps.setup-python.outputs.python-version }}
hash=${{ hashFiles('.github/workflows/build.yaml', 'pyproject.toml', 'tox.ini', 'cachedate.txt') }}
- run: uv tool install tox --with tox-uv

- name: test
run: |
python -m tox run -m ci
run: tox run -m ci

0 comments on commit dd53ef7

Please sign in to comment.