[patch] Pass a new parameter in the install pipeline to control walkm… #63
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Python Package | |
on: | |
push: | |
branches: [ "**" ] | |
tags-ignore: [ "**" ] | |
jobs: | |
build-package: | |
runs-on: ubuntu-latest | |
steps: | |
# 1. Initialize the build | |
# ------------------------------------------------------------------------------------------- | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Without this option, we don't get the tag information | |
with: | |
fetch-depth: 0 | |
- name: Initialise the build system | |
run: | | |
chmod u+x $GITHUB_WORKSPACE/build/bin/*.sh | |
$GITHUB_WORKSPACE/build/bin/initbuild.sh | |
source $GITHUB_WORKSPACE/build/bin/.functions.sh | |
# 2. Python Package Build | |
# ------------------------------------------------------------------------------------------- | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Build the Python package | |
run: | | |
sed -i "s#__version__ = \"100.0.0\"#__version__ = \"${{ env.VERSION_NOPREREL }}\"#g" ${GITHUB_WORKSPACE}/src/mas/devops/__init__.py | |
cat ${GITHUB_WORKSPACE}/src/mas/devops/__init__.py | |
python -m pip install --upgrade pip | |
pip install .[dev] | |
# There are no tests yet | |
# pytest | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 src --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. | |
flake8 src --count --exit-zero --max-complexity=10 --max-line-length=200 --statistics |