From 9fd83de059a9199827dfcfe4397051ec878cfea8 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 20 Oct 2024 15:18:49 -0400 Subject: Update workflows, use ruff for linting, and drop EOL python versions --- .github/workflows/test.yml | 51 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/test.yml (limited to '.github/workflows/test.yml') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..98c8fce --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,51 @@ +name: Test + +on: [push] + +jobs: + run-tests: + runs-on: ubuntu-22.04 + strategy: + matrix: + versions: + [ + { python: "3.9", poetry: "1.8.4" }, + { python: "3.10", poetry: "1.8.4" }, + { python: "3.11", poetry: "1.8.4" }, + { python: "3.12", poetry: "1.8.4" }, + { python: "3.13", poetry: "1.8.4" }, + ] + + steps: + - name: Checkout source code + uses: actions/checkout@v4 + + - name: Set up Poetry + run: pipx install poetry==${{ matrix.versions.poetry }} + + - name: Set up Python ${{ matrix.versions.python }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.versions.python }} + cache: "poetry" + + - name: Install Dependencies + run: poetry install -v + + - name: Install system LIRC + run: sudo apt-get install lirc + + - name: Run tests + run: poetry run task + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.xml + flags: unittests + name: codecov-umbrella + fail_ci_if_error: true + + - name: Build Package + run: poetry build -- cgit v1.2.3