workflows: fix

This commit is contained in:
Sina Atalay 2024-06-19 14:42:59 +03:00
parent 90eba3d3e6
commit 6a07d5da12
3 changed files with 16 additions and 6 deletions

View File

@ -18,6 +18,9 @@ jobs:
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install Hatch
uses: pypa/hatch@install
- name: Store cache ID - name: Store cache ID
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
@ -31,5 +34,4 @@ jobs:
- name: Deploy documentation - name: Deploy documentation
run: | run: |
pip install hatch
hatch run docs:deploy hatch run docs:deploy

View File

@ -29,6 +29,9 @@ jobs:
with: with:
python-version: "3.12" python-version: "3.12"
- name: Install Hatch
uses: pypa/hatch@install
- name: Check if the release tag matches the version - name: Check if the release tag matches the version
uses: samuelcolvin/check-python-version@v4.1 uses: samuelcolvin/check-python-version@v4.1
with: with:
@ -36,7 +39,6 @@ jobs:
- name: Build - name: Build
run: | run: |
pip install hatch
hatch build hatch build
- name: Upload package to PyPI - name: Upload package to PyPI

View File

@ -25,9 +25,11 @@ jobs:
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install Hatch
uses: pypa/hatch@install
- name: Lint with Ruff - name: Lint with Ruff
run: | run: |
pip install hatch
hatch run lint hatch run lint
continue-on-error: true continue-on-error: true
@ -51,10 +53,12 @@ jobs:
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install Hatch
uses: pypa/hatch@install
- name: Test - name: Test
run: | run: |
pip install hatch hatch run test:coverage run -m pytest
hatch run test:run-with-coverage
mv .coverage .coverage.${{ matrix.python-version }}.${{ matrix.os }} mv .coverage .coverage.${{ matrix.python-version }}.${{ matrix.os }}
- name: Store coverage files - name: Store coverage files
@ -84,9 +88,11 @@ jobs:
name: coverage name: coverage
path: coverage path: coverage
- name: Install Hatch
uses: pypa/hatch@install
- name: Combine coverage files - name: Combine coverage files
run: | run: |
pip install hatch
hatch run test:coverage combine coverage hatch run test:coverage combine coverage
hatch run test:coverage report hatch run test:coverage report
hatch run test:coverage html --show-contexts --title "RenderCV coverage for ${{ github.sha }}" hatch run test:coverage html --show-contexts --title "RenderCV coverage for ${{ github.sha }}"