From 3d21a9631810aa2fdcda10e85f8f2d210bec559c Mon Sep 17 00:00:00 2001 From: Richard Preen Date: Fri, 16 Aug 2024 14:51:14 +0100 Subject: [PATCH] update CI for Python3.12 (#228) * update CI for Python3.12 * update CI for Python3.12 * update CI for Python3.12 * update CI for Python3.12 * update CI for Python3.12 * separate Python 3.12 CI testing --- .github/workflows/tests.yml | 19 ++++++++++-- .github/workflows/tests_python312.yml | 42 +++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/tests_python312.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a1288ec..3609248 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,6 +8,7 @@ on: paths-ignore: - '**.md' - '**.cff' + workflow_dispatch: jobs: build: @@ -17,7 +18,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ['3.8', '3.9', '3.10', '3.11'] steps: - name: Checkout @@ -28,9 +29,21 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: venv activate Ubuntu/macOS + if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} + run: | + python -m venv venv-acro + source ./venv-acro/bin/activate + + - name: venv activate Windows + if: ${{ matrix.os == 'windows-latest' }} + run: | + python -m venv venv-acro + venv-acro\Scripts\activate.bat + - name: Install acro and pytest - run: pip install . pytest + run: python -m pip install . pytest - name: Run pytest - run: pytest . + run: python -m pytest . ... diff --git a/.github/workflows/tests_python312.yml b/.github/workflows/tests_python312.yml new file mode 100644 index 0000000..c877b24 --- /dev/null +++ b/.github/workflows/tests_python312.yml @@ -0,0 +1,42 @@ +--- +name: Test Python312 + +on: workflow_dispatch + +jobs: + build: + name: ${{ matrix.os }}-Python${{ matrix.python-version }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ['3.12'] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: venv activate Ubuntu/macOS + if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} + run: | + python -m venv venv-acro + source ./venv-acro/bin/activate + + - name: venv activate Windows + if: ${{ matrix.os == 'windows-latest' }} + run: | + python -m venv venv-acro + venv-acro\Scripts\activate.bat + + - name: Install acro and pytest + run: python -m pip install . pytest + + - name: Run pytest + run: python -m pytest . +...