mirror of
https://github.com/enpaul/vault2vault.git
synced 2024-12-03 15:29:48 +00:00
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:
parent
d11af1658d
commit
98d1bf3e8e
7
.github/scripts/setup-env.sh
vendored
7
.github/scripts/setup-env.sh
vendored
@ -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;
|
||||
|
31
.github/workflows/ci.yaml
vendored
31
.github/workflows/ci.yaml
vendored
@ -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
|
||||
|
2
Makefile
2
Makefile
@ -33,7 +33,7 @@ test: ## Run the project testsuite(s)
|
||||
poetry run tox --recreate --parallel
|
||||
|
||||
dev: ## Create the local dev environment
|
||||
poetry install
|
||||
poetry install --with dev --extras ansible --sync
|
||||
poetry run pre-commit install
|
||||
|
||||
publish: test wheel source ## Build and upload to pypi (requires $PYPI_API_KEY be set)
|
||||
|
Loading…
Reference in New Issue
Block a user