[patch] Fix bug in listSLSInstances #235
Workflow file for this run
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 | |
concurrency: | |
group: tests-on-ocp | |
cancel-in-progress: false | |
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 | |
env: | |
OCP_TOKEN: ${{ secrets.OCP_TOKEN }} | |
OCP_SERVER: ${{ secrets.OCP_SERVER }} | |
run: | | |
kubectl config set-cluster my-cluster --server=$OCP_SERVER | |
kubectl config set-credentials my-user --token=$OCP_TOKEN | |
kubectl config set-context my-context --cluster=my-cluster --user=my-user --namespace=default | |
kubectl config use-context my-context | |
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] | |
python -m 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 |