Skip to content

Release Version '1.12.1' into 'master' Branch #330

Release Version '1.12.1' into 'master' Branch

Release Version '1.12.1' into 'master' Branch #330

Workflow file for this run

name: Generate from Template and Commit to Biskotaki
on:
push:
branches:
- update-generate
pull_request:
branches:
- 'master'
jobs:
generate:
runs-on: ubuntu-latest
env:
branch: auto-generated
SUPER_SECRET: ${{ secrets.BISKOTAKI_GH_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install 'tox<4'
# For tox -e graphs (aka Pydeps)
# sudo apt update -y && sudo apt install -y aptitude
# sudo aptitude install -y graphviz
## CLONE BISKOTAKI REPO into cloned/biskotaki ##
# ROOT : cloned/biskotaki/pyproject.toml
- name: Clone Biskotaki repo
uses: actions/checkout@v4
with:
repository: boromir674/biskotaki
ref: ${{ env.branch }}
path: 'cloned/biskotaki'
- name: Find Biskotaki version
run: |
cd cloned/biskotaki
echo "PKG_VERSION=$(python scripts/parse_version.py)" >> $GITHUB_ENV
## GENERATE FROM TEMPLATE into gen/ ##
# ROOT : gen/biskotaki/pyproject.toml
- name: Generate Biskotaki from Template
run: |
pip install --user -e .
echo " version: \"${{ env.PKG_VERSION }}\"" >> .github/biskotaki.yaml
generate-python -o gen --config-file ./.github/biskotaki.yaml --no-input -f
## VALIDATE BISKOTAKI CI CONFIG file is in valid Yaml format ##
- name: "Validate YAML format"
run: |
GEN_CI_CONFIG=gen/biskotaki/.github/workflows/test.yaml
if [ ! $(yq eval 'true' "$GEN_CI_CONFIG") ]; then
echo "ERROR: $GEN_CI_CONFIG is malformed"
exit 1
fi
## Run Test Suite against the generated project ##
- name: Test distributions 'Source', 'Built' and 'edit' (dev env) mode installation
run: |
cd gen/biskotaki
tox -e "py310{-sdist, -wheel, -dev}"
tox -e coverage
## Verify Development Scripts operate as intented out of the box
- name: 'Ruff: Fast Python Linter -> PASS'
run: |
cd gen/biskotaki
tox -e ruff
# Running Lint Check, on src and Test code: Passes
# Running Type Check, on src and Test code: Passes
# Running the Build script (sdist and wheel): produces Distro Artifacts: Source (.tar.gz) and Wheel (.whl) files
# Running Quality Checks against Distro Metadata: Passes with 10/10 score
- name: Run Isort, Black, Mypy, Build, Pyroma and PyDeps commands
run: |
cd gen/biskotaki
tox -e lint
tox -e type
tox -e build
tox -e check
# tox -e graphs
## PUSH to BISKOTAKI REPO ##
- name: Push to dedicated branch in biskotaki repo
# Pin to v1.7.2 -> 07c4d7b3def0a8ebe788a8f2c843a4e1de4f6900
uses: cpina/github-action-push-to-another-repository@07c4d7b3def0a8ebe788a8f2c843a4e1de4f6900
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_GITHUB_KEY }}
with:
source-directory: 'gen/biskotaki'
destination-github-username: 'boromir674'
destination-repository-name: 'biskotaki'
user-email: [email protected]
user-name: 'Konstantinos'
destination-repository-username: 'boromir674'
target-branch: ${{ env.branch }}
commit-message: 'apply Template from https://github.com/boromir674/cookiecutter-python-package'