Skip to content

Commit

Permalink
ci: Finalize pytest workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aiakide committed Jan 30, 2025
1 parent 44b0a15 commit 87ef659
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 37 deletions.
40 changes: 4 additions & 36 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,20 @@ jobs:
if: runner.os == 'Windows'
shell: bash
run: echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH

- name: 🧙‍Install tox
run: uv tool install --python-preference only-managed --python 3.14 tox --with tox-uv --with tox-gh
- name: Install Python
- name: 🐍 Install Python
if: matrix.env != '3.14'
run: uv python install --python-preference only-managed ${{ matrix.env }}
- name: Setup test suite
- name: 🛠️Setup test suite
run: tox run --notest --skip-missing-interpreters false
env:
TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }}
- name: Run test suite
- name: 🏃 Run test suite
run: tox run --skip-pkg-install
env:
TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }}
- name: Surface failing tests
- name: 📃 Test results
if: always()
uses: pmeier/pytest-results-action@main
with:
Expand All @@ -64,34 +63,3 @@ jobs:

# (Optional) Title of the test results section in the workflow summary
title: Test results
# - run: mkdir results && touch results/tests-results-${{ matrix.python-version }}-${{matrix.os}}-summary.md
# - name: 🧪 Run tests
# uses: nuhrberg/pytest-summary@main
# with:
# extensions: pytest-cov
# options: --doctest-modules --cov-report term --cov-report xml:results/coverage-${{ matrix.python-version }}-${{matrix.os}}.xml --cov=niceml
# paths: tests/**
# output: results/tests-results-${{ matrix.python-version }}-${{matrix.os}}-summary.md
# show: "fail, skip"
# - name: ⬆️ Upload pytest results
# uses: actions/upload-artifact@v3
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# name: pytest-results-${{ matrix.python-version }}-${{matrix.os}}
# path: |
# results
# .test_report.xml
# # Use always() to always run this step to publish tests results when there are tests failures
# if: ${{ always() }}
# - name: 🖊️ Write job summary
# run: |
# echo "# 🧪 Test summary for python ${{ matrix.python-version }}-${{matrix.os}}" >> $GITHUB_STEP_SUMMARY
# if [[ "${{matrix.os}}" == "windows-latest" ]]
# then
# type results/test-results-${{ matrix.python-version }}-${{matrix.os}}-summary.md >> $GITHUB_STEP_SUMMARY
# else
# cat results/test-results-${{ matrix.python-version }}-${{matrix.os}}-summary.md >> $GITHUB_STEP_SUMMARY
# fi
# shell: bash
# if: ${{ always() }}
2 changes: 1 addition & 1 deletion tests/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@


def test_dummy_function():
assert dummyfunction() == 1
assert dummyfunction() == 0

0 comments on commit 87ef659

Please sign in to comment.