From dd264f1793f3ca86ad544d5cdc0dcbb786c22904 Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Sat, 23 Mar 2024 23:06:43 +0000 Subject: [PATCH] chore: update ci pipeline to include python 3.12 in tests (#217) --- .github/workflows/ci.yml | 2 +- .github/workflows/deploy-docs.yml | 49 ++++++++++++++++++++----------- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b44d0b8..9faad54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: [3.8, 3.9, "3.10", "3.11"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] runs-on: ${{ matrix.os }} steps: - name: Clone Repository diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 0a5aa24..bbf575f 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -7,20 +7,35 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/setup-python@v5 - - uses: actions/checkout@master - with: - fetch-depth: 0 # otherwise, you will failed to push refs to dest repo - - name: Install Dependencies - run: | - python -m pip install --upgrade pip - pip install poetry - poetry config virtualenvs.create false - poetry install - - name: Build and Commit - uses: sphinx-notes/pages@v3 - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: gh-pages + - name: Clone Repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # otherwise, you will failed to push refs to dest repo + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install poetry + uses: abatilo/actions-poetry@v2 + + - name: Setup a local virtual environment (if no poetry.toml file) + run: | + poetry config virtualenvs.create true --local + poetry config virtualenvs.in-project true --local + - uses: actions/cache@v3 + name: Define a cache for the virtual environment based on the dependencies lock file + with: + path: ./.venv + key: venv-${{ hashFiles('poetry.lock') }} + + - name: Install Dependencies + run: poetry install + - name: Build and Commit + uses: sphinx-notes/pages@v3 + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: gh-pages