From 3d0a82506fc9a806d90672d1e4b4e19ac0408594 Mon Sep 17 00:00:00 2001 From: Alexander Puck Neuwirth Date: Wed, 9 Oct 2024 13:51:58 +0200 Subject: [PATCH] Add yoda cis --- .github/workflows/test.yml | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..a04e377 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,55 @@ +name: Test + +on: + push: + branches: + - master + pull_request: + # Run daily at 0:01 UTC + schedule: + - cron: '1 0 * * *' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + test: + + runs-on: ubuntu-latest + container: apnpucky/gentoo-yoda:${{ matrix.yoda-version }}-latest + strategy: + matrix: + yoda-version: ['1.9.10', '2.0.1'] + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: astral-sh/setup-uv@v3 + + - name: Install dependencies + run: | + uv pip install --system '.[test]' + uv pip list + + - name: Test with pytest + run: | + pytest -r sx tests/ + + - name: Report core project coverage with Codecov + if: >- + github.event_name != 'schedule' && + matrix.os == 'ubuntu-latest' + uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: true + files: ./coverage.xml + flags: unittests-${{ matrix.python-version }} + name: pylhe + token: ${{ secrets.CODECOV_TOKEN }}