aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/cron.yml21
-rw-r--r--.github/workflows/docs.yml18
-rw-r--r--.github/workflows/release.yml21
-rw-r--r--.github/workflows/tests.yml17
4 files changed, 31 insertions, 46 deletions
diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml
index 3ca22f49..0ef4a551 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@v7
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" --cov-report=xml --cov-report=term --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/release.yml b/.github/workflows/release.yml
index 55d096f1..3ad5a317 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -7,7 +7,7 @@ jobs:
pypi_release:
name: Release on PyPi
runs-on: ubuntu-22.04
- if: github.repository == 'crocs-muni/sec-certs'
+ #if: github.repository == 'crocs-muni/sec-certs'
environment:
name: pypi
url: https://pypi.org/project/sec-certs/
@@ -17,19 +17,16 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- - name: Set up Python
- uses: actions/setup-python@v5
+ - name: Install uv and Python
+ uses: astral-sh/setup-uv@v7
with:
- python-version: "3.10"
- - name: apt-get update
- run: sudo apt-get update
- - name: Install build dependencies
- run: python -m pip install build
- - name: Build distributions
- shell: bash -l {0}
- run: python -m build
+ python-version: 3.10
+ enable-cache: true
+ - name: Build
+ run: uv build
- name: Publish package to PyPI
- uses: pypa/gh-action-pypi-publish@release/v1
+ if: false
+ run: uv publish
docker_release:
name: Release on DockerHub
environment:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index a7ee60a2..e39ce058 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@v7
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" --cov-report=xml --cov-report=term --junitxml=junit.xml -o junit_family=legacy tests
- name: Test summary
if: always()
uses: test-summary/action@v2