From 88e2e5e392d085ab286f8234ac0c724d04acf452 Mon Sep 17 00:00:00 2001 From: Carl Crowder Date: Sun, 14 May 2023 19:48:17 +0700 Subject: [PATCH] Updating CI config with poetry packaging --- .github/workflows/ci.yaml | 52 +++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 06042df..16856fa 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,14 +21,14 @@ jobs: fetch-depth: 0 - name: Set up Python ${{ env.DEFAULT_PYTHON }} id: python - uses: actions/setup-python@v2.3.1 + uses: actions/setup-python@v4 with: python-version: ${{ env.DEFAULT_PYTHON }} - name: Generate partial Python venv restore key id: generate-python-key run: >- echo "::set-output name=key::base-venv-${{ env.CACHE_VERSION }}-${{ - hashFiles('setup.cfg', 'requirements_test.txt', 'requirements_test_min.txt') + hashFiles('poetry.lock', 'pyproject.toml') }}" - name: Restore Python virtual environment id: cache-venv @@ -45,8 +45,8 @@ jobs: run: | python -m venv venv . venv/bin/activate - python -m pip install -U pip setuptools wheel - pip install -U -r requirements_test.txt + python -m pip install -U pip poetry + poetry install - name: Generate pre-commit restore key id: generate-pre-commit-key run: >- @@ -72,7 +72,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9, "3.10"] + python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] outputs: python-key: ${{ steps.generate-python-key.outputs.key }} steps: @@ -82,14 +82,14 @@ jobs: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} id: python - uses: actions/setup-python@v2.3.1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Generate partial Python venv restore key id: generate-python-key run: >- echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{ - hashFiles('setup.cfg', 'requirements_test.txt', 'requirements_test_min.txt') + hashFiles('poetry.lock', 'pyproject.toml') }}" - name: Restore Python virtual environment id: cache-venv @@ -106,8 +106,8 @@ jobs: run: | python -m venv venv . venv/bin/activate - python -m pip install -U pip setuptools wheel - pip install -U -r requirements_test.txt + python -m pip install -U pip poetry + poetry install pytest-linux: name: Run tests Python ${{ matrix.python-version }} (Linux) @@ -116,13 +116,13 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.6, 3.7, 3.8, 3.9, "3.10"] + python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] steps: - name: Check out code from GitHub uses: actions/checkout@v2.4.0 - name: Set up Python ${{ matrix.python-version }} id: python - uses: actions/setup-python@v2.3.1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Restore Python virtual environment @@ -162,7 +162,7 @@ jobs: uses: actions/checkout@v2.4.0 - name: Set up Python ${{ matrix.python-version }} id: python - uses: actions/setup-python@v2.3.1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Restore Python virtual environment @@ -197,7 +197,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9, "3.10"] + python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] outputs: python-key: ${{ steps.generate-python-key.outputs.key }} steps: @@ -207,14 +207,14 @@ jobs: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} id: python - uses: actions/setup-python@v2.3.1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Generate partial Python venv restore key id: generate-python-key run: >- echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{ - hashFiles('setup.cfg', 'requirements_test_min.txt') + hashFiles('poetry.lock', 'pyproject.toml') }}" - name: Restore Python virtual environment id: cache-venv @@ -231,8 +231,8 @@ jobs: run: | python -m venv venv . venv\\Scripts\\activate - python -m pip install -U pip setuptools wheel - pip install -U -r requirements_test_min.txt + python -m pip install -U pip poetry + poetry install pytest-windows: name: Run tests Python ${{ matrix.python-version }} (Windows) @@ -241,7 +241,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.6, 3.7, 3.8, 3.9, "3.10"] + python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] steps: - name: Set temp directory run: echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV @@ -251,7 +251,7 @@ jobs: uses: actions/checkout@v2.4.0 - name: Set up Python ${{ matrix.python-version }} id: python - uses: actions/setup-python@v2.3.1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Restore Python virtual environment @@ -277,7 +277,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["pypy3"] + python-version: ["pypy3.7", "pypy3.8", "pypy3.9"] outputs: python-key: ${{ steps.generate-python-key.outputs.key }} steps: @@ -287,14 +287,14 @@ jobs: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} id: python - uses: actions/setup-python@v2.3.1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Generate partial Python venv restore key id: generate-python-key run: >- echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{ - hashFiles('setup.cfg', 'requirements_test_min.txt') + hashFiles('poetry.lock', 'pyproject.toml') }}" - name: Restore Python virtual environment id: cache-venv @@ -311,8 +311,8 @@ jobs: run: | python -m venv venv . venv/bin/activate - python -m pip install -U pip setuptools wheel - pip install -U -r requirements_test_min.txt + python -m pip install -U pip poetry + poetry install pytest-pypy: name: Run tests Python ${{ matrix.python-version }} @@ -321,13 +321,13 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["pypy3"] + python-version: ["pypy3.7", "pypy3.8", "pypy3.9"] steps: - name: Check out code from GitHub uses: actions/checkout@v2.4.0 - name: Set up Python ${{ matrix.python-version }} id: python - uses: actions/setup-python@v2.3.1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Restore Python virtual environment