Skip to content

Commit

Permalink
try to get things installed with uv
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoubelet committed Oct 15, 2024
1 parent b4ff24d commit 8988001
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 23 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ defaults:
run:
shell: bash

env:
UV_SYSTEM_PYTHON: 1 # for uv pip to install in the system python installed by actions/setup-python

on: # Runs on all push events to master branch and any push related to a pull request
push:
branches:
Expand All @@ -24,14 +27,15 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'

- name: Upgrade pip, setuptools and wheel
run: python -m pip install --upgrade pip setuptools wheel
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: pyproject.toml

- name: Install package with test dependencies
run: python -m pip install ".[test]"
run: uv pip install ".[test]"

- name: Get acc-models-lhc
run: git clone -b 2022 https://gitlab.cern.ch/acc-models/acc-models-lhc.git --depth 1
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ defaults:
run:
shell: bash

env:
UV_SYSTEM_PYTHON: 1 # for uv pip to install in the system python installed by actions/setup-python

on: # Runs on master branch on Mondays at 3am UTC time
schedule:
- cron: '* 12 * * Sat'
Expand All @@ -26,14 +29,15 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'

- name: Upgrade pip, setuptools and wheel
run: python -m pip install --upgrade pip setuptools wheel

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: pyproject.toml

- name: Install package with test dependencies
run: python -m pip install ".[test]"
run: uv pip install ".[test]"

- name: Get acc-models-lhc
run: git clone -b 2022 https://gitlab.cern.ch/acc-models/acc-models-lhc.git --depth 1
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ defaults:
run:
shell: bash

env:
UV_SYSTEM_PYTHON: 1 # for uv pip to install in the system python installed by actions/setup-python

on: # Runs on any push event in a PR or any push event to master
pull_request:
push:
Expand Down Expand Up @@ -33,14 +36,15 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'

- name: Upgrade pip, setuptools and wheel
run: python -m pip install --upgrade pip setuptools wheel
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: pyproject.toml

- name: Install package with doc dependencies
run: python -m pip install ".[docs]"
run: uv pip install ".[docs]"

- name: Get acc-models-lhc
run: git clone -b 2022 https://gitlab.cern.ch/acc-models/acc-models-lhc.git --depth 1
Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ defaults:
run:
shell: bash

env:
UV_SYSTEM_PYTHON: 1 # for uv pip to install in the system python installed by actions/setup-python

on: # Runs on any push event to any branch except master (the coverage workflow takes care of that)
push:
branches-ignore:
Expand All @@ -26,11 +29,15 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: '**/pyproject.toml'

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: pyproject.toml

- name: Install package with test dependencies
run: python -m pip install ".[test]"
run: uv pip install ".[test]"

- name: Run Tests
run: make quicktests
Expand All @@ -52,11 +59,15 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: '**/pyproject.toml'

- name: Install package
run: python -m pip install ".[test]"
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: pyproject.toml

- name: Install package with test dependencies
run: uv pip install ".[test]"

- name: Get acc-models-lhc
run: git clone -b 2022 https://gitlab.cern.ch/acc-models/acc-models-lhc.git --depth 1
Expand Down

0 comments on commit 8988001

Please sign in to comment.