Skip to content

Update to latest python versions #4

Update to latest python versions

Update to latest python versions #4

Workflow file for this run

# DOCS:
# 1. https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: wiji ci
on:
pull_request:
push:
branches:
- master
jobs:
check_release_notes:
name: check_release_notes
timeout-minutes: 1
strategy:
matrix:
platform: [ubuntu-22.04]
runs-on: ${{ matrix.platform }}
steps:
# checkout master branch and the current branch so that we are able to do diff operations.
- name: checkout master branch too.
uses: actions/checkout@v4
with:
ref: master
- name: Check out code
uses: actions/checkout@v4
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
- name: check if changes have release notes
if: ${{ github.ref != 'refs/heads/master' }}
env:
GIT_BRANCH: ${{ github.ref }}
GITHUB_HEAD_REF: ${{ github.head_ref }}
GITHUB_BASE_REF: ${{ github.base_ref }}
run: |
printf "GIT_BRANCH: $GIT_BRANCH \n"
printf "GITHUB_HEAD_REF: $GITHUB_HEAD_REF \n"
printf "GITHUB_BASE_REF: $GITHUB_BASE_REF \n"
printf "list git branches: \n"
git branch --list --all
if [[ "$GIT_BRANCH" == "refs/heads/master" ]]
then
printf "\n $GIT_BRANCH branch, ignoring check for relese notes \n"
elif [[ "$GIT_BRANCH" == *"refs/tags/"* ]]
then
printf "\n $GIT_BRANCH branch, ignoring check for relese notes \n"
else
ChangedFiles=`git diff --name-only remotes/origin/master`
echo $ChangedFiles
case "$ChangedFiles" in
*CHANGELOG.*)
printf "\n Thanks, your commits include update to release notes. \n";;
*)
printf "\n You should add release notes to CHANGELOG.md \n" && exit 77;;
esac
fi
run_tests:
name: run_tests
timeout-minutes: 7
strategy:
matrix:
python-version: ["3.11", "3.12"]
platform: [ubuntu-22.04]
runs-on: ${{ matrix.platform }}
services:
redis:
image: redis:3.0-alpine
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: run_tests
run: |
ulimit -a
env
set -x
pwd
pip install -e .[dev,test]
find . -name '*.pyc' -delete;find . -name '__pycache__' -delete | xargs echo
# normal coverage
coverage erase
coverage run --omit="*tests*,*cli/test_*,*examples/*,*.virtualenvs/*,*virtualenv/*,*.venv/*,*__init__*" -m unittest discover -v -s .
codecov
coverage report --show-missing --fail-under=70
# branch coverage
coverage erase
coverage run --branch --omit="*tests*,*cli/test_*,*examples/*,*.virtualenvs/*,*virtualenv/*,*.venv/*,*__init__*" -m unittest discover -v -s .
codecov
coverage report --show-missing --fail-under=67
env:
WIJI_DEBUG: '1'
PYTHONASYNCIODEBUG: '1'
IN_DOCKER: 'YES'
WIJI_TEST_REDIS_CONTAINER_NAME: 'wiji_test_redis_container'
REDIS_HOST: 'redis'
REDIS_PORT: '6379'
run_analysis:
name: run_analysis
timeout-minutes: 8
strategy:
matrix:
python-version: ["3.11"]
platform: [ubuntu-22.04]
runs-on: ${{ matrix.platform }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: run_analysis
run: |
ulimit -a
env
set -x
pwd
pip install -e .[dev,test]
find . -name '*.pyc' -delete;find . -name '__pycache__' -delete | xargs echo
python --version
black --line-length=100 --check . || { printf "\\n\\t please use black to format your code."; exit 77; }
flake8 .
pylint --enable=E --disable=W,R,C --unsafe-load-any-extension=y wiji/ cli/ tests/ documentation/
bandit -r --exclude .venv -ll .
mypy --show-column-numbers -p cli -p wiji #--strict
env:
WIJI_DEBUG: '1'
PYTHONASYNCIODEBUG: '1'
run_wiji:
name: run_wiji
timeout-minutes: 8
strategy:
matrix:
python-version: ["3.11"]
platform: [ubuntu-22.04]
runs-on: ${{ matrix.platform }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: run_wiji
run: |
ulimit -a
env
set -x
pwd
pip install -e .[dev,test]
find . -name '*.pyc' -delete;find . -name '__pycache__' -delete | xargs echo
wiji-cli --version
wiji-cli --app tests.testdata.cli.my_app.MyAppInstance --dry-run
env:
WIJI_DEBUG: '1'
PYTHONASYNCIODEBUG: '1'