From 5fc5b9d190ff41b9703fab5970df58510f3f4f4f Mon Sep 17 00:00:00 2001 From: Yevhenii Vaskivskyi Date: Thu, 23 Nov 2023 20:54:44 +0100 Subject: [PATCH] Add Python 3.12 to the CI workflow (#398) --- .github/workflows/ci.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae3e2f1..598248c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,26 +9,27 @@ on: schedule: - cron: "0 0 * * *" -env: - DEFAULT_PYTHON: 3.11 - concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: prepare: + name: Preparation runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.11, 3.12] outputs: pip_cache_dir: ${{ steps.pip-cache.outputs.dir }} steps: - name: Checkout uses: actions/checkout@v4.1.1 - - name: Set up Python ${{ env.DEFAULT_PYTHON }} + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4.7.1 with: - python-version: ${{ env.DEFAULT_PYTHON }} + python-version: ${{ matrix.python-version }} - name: Get pip cache directory path id: pip-cache @@ -51,16 +52,20 @@ jobs: pip install -r requirements_test.txt unit-tests: + name: Unit Tests needs: prepare runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.11, 3.12] steps: - name: Checkout uses: actions/checkout@v4.1.1 - - name: Set up Python ${{ env.DEFAULT_PYTHON }} + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4.7.1 with: - python-version: ${{ env.DEFAULT_PYTHON }} + python-version: ${{ matrix.python-version }} - name: Get pip cache directory path id: pip-cache @@ -93,16 +98,20 @@ jobs: path: unit-tests-cov.xml device-tests: + name: Device Tests needs: prepare runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.11, 3.12] steps: - name: Checkout uses: actions/checkout@v4.1.1 - - name: Set up Python ${{ env.DEFAULT_PYTHON }} + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4.7.1 with: - python-version: ${{ env.DEFAULT_PYTHON }} + python-version: ${{ matrix.python-version }} - name: Get pip cache directory path id: pip-cache @@ -135,6 +144,7 @@ jobs: path: real-data-tests-cov.xml codecov: + name: Codecov needs: [unit-tests, device-tests] runs-on: ubuntu-latest steps: