From e8e3b8a3c83efe747bc72786eaf751b63d5e45e8 Mon Sep 17 00:00:00 2001 From: Alex Lowe Date: Wed, 18 Sep 2024 20:55:43 -0400 Subject: [PATCH] Add GitHub workflow for linting and testing --- .github/workflows/tests.yaml | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..fde8e8d --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,45 @@ +name: test +on: + push: + branches: + - "master" + - "feature/*" + - "hotfix/*" + - "release/*" + - "renovate/*" + pull_request: + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install dependencies + run: make setup + - name: Run Linters + run: make lint + test: + strategy: + matrix: + platform: [ubuntu-latest, macos-latest] + python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13-dev'] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + cache: 'pip' + - name: Install dependencies + run: make setup + - name: Run tests + run: make test + env: + PYTEST_ADDOPTS: "--no-header -vv -rN"