Update repo automation to use new command syntax

Update CI to use Poetry 1.3
Update workflows to match patterns from tox-poetry-installer
Update workflows to use newer job versions
Update makefile and CI to use Poetry 1.3 command syntax
This commit is contained in:
2023-03-02 17:03:20 -05:00
parent d11af1658d
commit 98d1bf3e8e
3 changed files with 28 additions and 12 deletions

View File

@@ -8,7 +8,7 @@
set -e;
CI_CACHE=$HOME/.cache;
POETRY_VERSION=1.1.12;
POETRY_VERSION=1.3.2;
mkdir --parents "$CI_CACHE";
@@ -27,8 +27,9 @@ poetry run pip --version;
poetry install \
--quiet \
--remove-untracked \
--no-ansi;
--sync \
--no-ansi \
--only ci;
poetry env info;
poetry run tox --version;

View File

@@ -7,8 +7,10 @@ on:
branches: ["devel"]
jobs:
Test:
name: Python ${{ matrix.python.version }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python:
- version: "3.6"
@@ -24,12 +26,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Python ${{ matrix.python.version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python.version }}
- name: Configure Job Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.cache/pip
@@ -39,38 +43,49 @@ jobs:
# will be invalidated, and thus all packages will be redownloaded, if the
# lockfile is updated
key: ${{ runner.os }}-${{ matrix.python.toxenv }}-${{ hashFiles('**/poetry.lock') }}
- name: Configure Path
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Configure Environment
run: .github/scripts/setup-env.sh
- name: Run Toxenv ${{ matrix.python.toxenv }}
run: poetry run tox -e ${{ matrix.python.toxenv }}
Check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Python 3.8
uses: actions/setup-python@v1
- name: Install Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: "3.10"
- name: Configure Job Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.cache/pypoetry/cache
~/.poetry
# Hardcoded 'py38' slug here lets this cache piggyback on the 'py38' cache
# Hardcoded 'py310' slug here lets this cache piggyback on the 'py310' cache
# that is generated for the tests above
key: ${{ runner.os }}-py38-${{ hashFiles('**/poetry.lock') }}
key: ${{ runner.os }}-py310-${{ hashFiles('**/poetry.lock') }}
- name: Configure Path
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Configure Environment
run: .github/scripts/setup-env.sh
- name: Run Static Analysis Checks
run: poetry run tox -e static
- name: Run Static Analysis Checks (Tests)
run: poetry run tox -e static-tests
- name: Run Security Checks
run: poetry run tox -e security