From 2a92a688ffc03dc34fe7f5d7614ce28b1c3ff464 Mon Sep 17 00:00:00 2001 From: Julian Paquerot <111422357+Kajiih@users.noreply.github.com> Date: Tue, 26 Nov 2024 02:03:15 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Pytest=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bc6f1ba..3874497 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,16 +35,17 @@ jobs: uses: astral-sh/setup-uv@v3 with: enable-cache: true + version: "0.5.4" - name: ๐Ÿ Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - # - name: ๐Ÿ’พ Setup pip cache - # uses: actions/cache@v4 - # with: - # path: ${{ matrix.path }} - # key: ${{ runner.os }}-pip-${{ hashFiles('uv.lock') }} - # restore-keys: ${{ runner.os }}-pip- + - name: ๐Ÿ’พ Setup pip cache + uses: actions/cache@v4 + with: + path: ${{ matrix.path }} + key: ${{ runner.os }}-pip-${{ hashFiles('uv.lock') }} + restore-keys: ${{ runner.os }}-pip- - name: ๐Ÿ“ฅ Install the project run: uv sync --all-extras --dev @@ -53,14 +54,15 @@ jobs: uses: chartboost/ruff-action@v1 continue-on-error: true - # - name: ๐Ÿ“ฅ Install pytest-action dependencies - # run: | - # uv pip install pytest-md pytest-emoji - # - name: ๐Ÿงช Run pytest @pavelzw - # uses: pavelzw/pytest-action@v2 - # with: - # custom-arguments: "tests -rA --doctest-modules --cov=." - # continue-on-error: true + - name: ๐Ÿ“ฅ Install pytest-action dependencies + run: | + pipx install pytest pytest-cov + uv pip install pytest-md pytest-emoji + - name: ๐Ÿงช Run pytest @pavelzw + uses: pavelzw/pytest-action@v2 + with: + custom-arguments: "tests -rA --doctest-modules --cov=." + continue-on-error: true - name: ๐Ÿงช Run Pytest with command run: pytest tests -rA --doctest-modules --cov=. @@ -95,5 +97,5 @@ jobs: - name: ๐Ÿ—๏ธ Build run: | - # pipx install hatch + pipx install hatch hatch build