From 327a7381efcc23888821778562a3a9074af50c60 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sat, 13 May 2023 11:54:33 -0400 Subject: Run test CI job on all supported python versions --- .github/workflows/ci.yaml | 29 ----------------------------- .github/workflows/lint.yaml | 26 ++++++++++++++++++++++++++ .github/workflows/test.yaml | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/lint.yaml create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 3611ff8..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: CI - -on: [push, pull_request] - -jobs: - lint-and-test: - name: Run linters and the test suite - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v3 - - - name: Install poetry - run: pipx install poetry - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - cache: 'poetry' - - - name: Install dependencies - run: poetry install - - - name: Run linters - run: poetry run task lint - - - name: Run tests - run: poetry run task test diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..b19ca40 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,26 @@ +name: Lint + +on: [push, pull_request] + +jobs: + lint: + name: Run linters + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Install poetry + run: pipx install poetry + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + cache: 'poetry' + + - name: Install dependencies + run: poetry install --without test + + - name: Run linters + run: poetry run task lint diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..9b2c377 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,34 @@ +name: Test + +on: [push, pull_request] + +jobs: + test: + name: Run the test suite + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - 3.7 + - 3.8 + - 3.9 + - '3.10' + - '3.11' + steps: + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Install poetry + run: pipx install poetry + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: 'poetry' + + - name: Install dependencies + run: poetry install --without lint + + - name: Run tests + run: poetry run task test -- cgit v1.2.3