From 6a07d5da12a02a70105bfe5f1f40fdeaf7259a37 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Wed, 19 Jun 2024 14:42:59 +0300 Subject: [PATCH] workflows: fix --- .github/workflows/deploy-docs.yaml | 4 +++- .github/workflows/publish.yaml | 4 +++- .github/workflows/test.yaml | 14 ++++++++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-docs.yaml b/.github/workflows/deploy-docs.yaml index c41cbcd..463d1fd 100644 --- a/.github/workflows/deploy-docs.yaml +++ b/.github/workflows/deploy-docs.yaml @@ -17,6 +17,9 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + + - name: Install Hatch + uses: pypa/hatch@install - name: Store cache ID run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV @@ -31,5 +34,4 @@ jobs: - name: Deploy documentation run: | - pip install hatch hatch run docs:deploy diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 0a81944..a436387 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -29,6 +29,9 @@ jobs: with: python-version: "3.12" + - name: Install Hatch + uses: pypa/hatch@install + - name: Check if the release tag matches the version uses: samuelcolvin/check-python-version@v4.1 with: @@ -36,7 +39,6 @@ jobs: - name: Build run: | - pip install hatch hatch build - name: Upload package to PyPI diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f2f85e3..155ab94 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -25,9 +25,11 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Install Hatch + uses: pypa/hatch@install + - name: Lint with Ruff run: | - pip install hatch hatch run lint continue-on-error: true @@ -50,11 +52,13 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + + - name: Install Hatch + uses: pypa/hatch@install - name: Test run: | - pip install hatch - hatch run test:run-with-coverage + hatch run test:coverage run -m pytest mv .coverage .coverage.${{ matrix.python-version }}.${{ matrix.os }} - name: Store coverage files @@ -84,9 +88,11 @@ jobs: name: coverage path: coverage + - name: Install Hatch + uses: pypa/hatch@install + - name: Combine coverage files run: | - pip install hatch hatch run test:coverage combine coverage hatch run test:coverage report hatch run test:coverage html --show-contexts --title "RenderCV coverage for ${{ github.sha }}"