aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorJ08nY2025-11-17 17:33:45 +0100
committerJ08nY2025-11-17 17:33:45 +0100
commitdc8cd4bfb5acee6abab74c7401b43505f669cec3 (patch)
tree255c1f4e1c37147726c505b696d3997737af90dd /.github/workflows
parent9564933c5468c988fa24525c24fad554bb9dfca3 (diff)
downloadsec-certs-dc8cd4bfb5acee6abab74c7401b43505f669cec3.tar.gz
sec-certs-dc8cd4bfb5acee6abab74c7401b43505f669cec3.tar.zst
sec-certs-dc8cd4bfb5acee6abab74c7401b43505f669cec3.zip
Move away from pip-tools and use uv.
uv is all the rage. No, but really. The pip-compile approach does not work cross-platform or cross-python version (sometimes it does, but not always). In comparison and uv lockfile is universal and cross-platform: https://docs.astral.sh/uv/concepts/projects/layout/#the-lockfile This should help make our install easier and more robust.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/cron.yml21
-rw-r--r--.github/workflows/docs.yml18
-rw-r--r--.github/workflows/tests.yml17
3 files changed, 22 insertions, 34 deletions
diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml
index 3ca22f49..fb9b86a0 100644
--- a/.github/workflows/cron.yml
+++ b/.github/workflows/cron.yml
@@ -17,22 +17,17 @@ jobs:
- name: Install Poppler
run: sudo apt-get install -y build-essential libpoppler-cpp-dev pkg-config python3-dev
- uses: actions/checkout@v4
- - name: Setup python
- uses: actions/setup-python@v5
+ - name: Install uv and Python
+ uses: astral-sh/setup-uv@v6
with:
- python-version: "3.10"
- cache: "pip"
- cache-dependency-path: |
- requirements/test_requirements.txt
- - name: Install python dependencies
- run: |
- pip install -r requirements/test_requirements.txt
+ python-version: ${{ matrix.python-version }}
+ enable-cache: true
- name: Install sec-certs
run: |
- pip install -e .
- python -m spacy download en_core_web_sm
+ uv sync --locked --dev
+ uv run spacy download en_core_web_sm
- name: Run tests
- run: pytest --cov=sec_certs -m "remote" --junitxml=junit.xml -o junit_family=legacy tests
+ run: uv run pytest --cov=sec_certs -m "remote" --junitxml=junit.xml -o junit_family=legacy tests
continue-on-error: true
- name: Test summary
if: always()
@@ -48,4 +43,4 @@ jobs:
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
- token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file
+ token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 6deb8984..eb432751 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -11,24 +11,22 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- - uses: actions/setup-python@v5
- with:
- python-version: "3.10"
- cache: "pip"
- cache-dependency-path: |
- requirements/dev_requirements.txt
- name: apt-get update
run: sudo apt-get update
- name: Install external dependencies
run: sudo apt-get install build-essential libpoppler-cpp-dev pkg-config python3-dev -y
- - name: Install sec-certs and deps
+ - name: Install uv and Python
+ uses: astral-sh/setup-uv@v6
+ with:
+ python-version: ${{ matrix.python-version }}
+ enable-cache: true
+ - name: Install sec-certs
run: |
- pip install -r requirements/dev_requirements.txt
- pip install -e .
+ uv sync --locked --dev
- name: Build docs
run: |
cd docs
- make html
+ uv run make html
- name: Save docs artifact
uses: actions/upload-artifact@v4.4.0
with:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index a7ee60a2..712d43fc 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -21,22 +21,17 @@ jobs:
- name: Install Poppler
run: sudo apt-get install -y build-essential libpoppler-cpp-dev pkg-config python3-dev
- uses: actions/checkout@v4
- - name: Setup python ${{ matrix.python-version }}
- uses: actions/setup-python@v5
+ - name: Install uv and Python
+ uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
- cache: "pip"
- cache-dependency-path: |
- requirements/test_requirements.txt
- - name: Install python dependencies
- run: |
- pip install -r requirements/test_requirements.txt
+ enable-cache: true
- name: Install sec-certs
run: |
- pip install -e .
- python -m spacy download en_core_web_sm
+ uv sync --locked --dev
+ uv run spacy download en_core_web_sm
- name: Run tests
- run: pytest --cov=sec_certs -m "not remote" --junitxml=junit.xml -o junit_family=legacy tests
+ run: uv run pytest --cov=sec_certs -m "not remote" --junitxml=junit.xml -o junit_family=legacy tests
- name: Test summary
if: always()
uses: test-summary/action@v2