From bd43fc9e3b8dfb118cb52eda7243a12d5c9481d7 Mon Sep 17 00:00:00 2001 From: Vadim Velicodnii Date: Mon, 4 Nov 2024 13:03:53 +0000 Subject: [PATCH] add github action for testing --- .github/workflows/test.yaml | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..9978fca --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,43 @@ +name: test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +jobs: + run: + name: Python ${{ matrix.python-version }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Hatch + run: | + python${{ matrix.python-version }} -m pip install hatch + + - name: Run static analysis + run: hatch fmt --check + + # - name: Check types + # run: hatch run types:check + + - name: Run tests + run: hatch test --python ${{ matrix.python-version }}