Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c38465e
test: retry 3 times before raising Time Out Error in test_downloading
boromir674 Apr 10, 2023
4669aa8
ci: enable automated pypi pulbish
boromir674 Apr 13, 2023
64820f3
update pyproject/poetry.lock
boromir674 Apr 13, 2023
f91c90c
ci: fix tox
boromir674 Apr 13, 2023
79218e7
try to fix
boromir674 Apr 13, 2023
2732d63
sanity check
boromir674 Apr 13, 2023
b5b2801
try Lint
boromir674 Apr 13, 2023
296aa70
try lint
boromir674 Apr 13, 2023
7438ded
pass tox -e lint
boromir674 Apr 13, 2023
c5e96e1
deactivate lint Job for Windows
boromir674 Apr 13, 2023
796e134
fix lint ci Job
boromir674 Apr 13, 2023
f092eb6
fix bash syntax
boromir674 Apr 13, 2023
3d09fad
fix syntax
boromir674 Apr 13, 2023
b467af7
use aws to compare score and threshold
boromir674 Apr 13, 2023
32530df
use old awk code
boromir674 Apr 13, 2023
1a5b18b
deactivate pylint for test code
boromir674 Apr 13, 2023
4ce97b6
ci: pass List Job
boromir674 Apr 15, 2023
b71be28
for ci testing: enable unit-tests Matrix
boromir674 Apr 15, 2023
454e594
unsupport python3.7
boromir674 Apr 15, 2023
6326fd6
ci: install ffmpeg on macos
boromir674 Apr 15, 2023
ad6e12f
for ci testing: test macos matrix
boromir674 Apr 15, 2023
be86e98
test(macos): use 'Lavf59.27.100' as the expected encoder ffmpeg will …
boromir674 Apr 15, 2023
dda10e7
enable full ci/cd workflow
boromir674 Apr 15, 2023
938bff6
Merge branch 'dev' into release
boromir674 Apr 15, 2023
bc35c85
release(semantic_version): bump version to 1.4.1
boromir674 Apr 15, 2023
f7b82f6
ci: fix lint checking with isort and black
boromir674 Apr 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 47 additions & 27 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@ name: CI/CD Pipeline

# Triggers on all branches and tags starting with v

# Full Job Matrix for Stress Testing is activated on 'master', 'dev' and tags
# Full Job Matrix for Stress Testing is activated on:
# - branches 'master', 'main', 'stress-test'
# - tags =~ v*

## We Test factoring Platforms and Python versions

# For other branches only one Job is spawned for Running (Unit) Tests

# PyPI publish on v* tags on 'master' branch
# Test PyPI publish on v* 'pre-release' tags on 'release' branch

# ie on 'master' branch for stress-test and pypi publish tag: v1.7.4
# ie on 'release' branch for stress-test and test-pypi publish tag: v1.7.4-rc.0, v1.7.4-rc.1

# Dockerhub publish on all branches and tags

on:
Expand All @@ -23,20 +29,21 @@ on:
env:
# Job Matrix as an env var !
# FULL_MATRIX_STRATEGY: "{\"platform\": [\"ubuntu-latest\", \"macos-latest\", \"windows-latest\"], \"python-version\": [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\"]}"
FULL_MATRIX_STRATEGY: "{\"platform\": [\"ubuntu-latest\", \"macos-latest\"], \"python-version\": [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\"]}"
FULL_MATRIX_STRATEGY: "{\"platform\": [\"ubuntu-latest\", \"macos-latest\"], \"python-version\": [\"3.8\", \"3.9\", \"3.10\", \"3.11\"]}"
UBUNTU_PY310_STRATEGY: "{\"platform\":[\"ubuntu-latest\"], \"python-version\":[\"3.10\"]}"
TEST_STRATEGY: "{\"platform\":[\"ubuntu-latest\", \"macos-latest\", \"windows-latest\"], \"python-version\":[\"3.9\"]}"
TEST_STRATEGY: "{\"platform\": [\"macos-latest\"], \"python-version\": [\"3.8\", \"3.9\", \"3.10\", \"3.11\"]}"

# Lint Matrix
LINT_MATRIX: "{\"platform\":[\"ubuntu-latest\", \"macos-latest\", \"windows-latest\"], \"python-version\":[\"3.10\"]}"
# LINT_MATRIX: "{\"platform\":[\"ubuntu-latest\", \"macos-latest\", \"windows-latest\"], \"python-version\":[\"3.10\"]}"
LINT_MATRIX: "{\"platform\":[\"ubuntu-latest\", \"macos-latest\"], \"python-version\":[\"3.10\"]}"

# On/Off switches for the various CI/CD steps
# If false the step prevented from running
# If false the step is prevented from running
# If true the step is allowed to run (it still may be skipped on other runtime conditions)
RUN_UNIT_TESTS: "true"
RUN_LINT_CHECKS: "true"
BUILD_DOCKER: "true"
PUBLISH_ON_PYPI: "false"
PUBLISH_ON_PYPI: "true"
DRAW_DEPENDENCIES: "true"

jobs:
Expand Down Expand Up @@ -114,7 +121,7 @@ jobs:
# TODO: provision those external dependencies at build-time through a custom docker image as runner
- name: Install external deps on MacOS
if: ${{ matrix.platform == 'macos-latest' }}
run: brew install graphviz
run: brew install ffmpeg
- name: Install external deps on Ubuntu
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install -y --install-recommends ffmpeg
Expand Down Expand Up @@ -314,36 +321,49 @@ jobs:
matrix: ${{fromJson(needs.set_github_outputs.outputs.LINT_MATRIX)}}
steps:
- uses: actions/checkout@v3
- run: echo "Platform is ${{ matrix.platform }}, Ptython is ${{ matrix.python-version }}"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox==3.28 tox-gh-actions
python -m pip install tox==3.28
- name: Lint check code with Isort and Black
if: ${{ matrix.platform != 'windows-latest' }}
run: tox -e lint -vv -s false
- run: tox -e pylint -vv -s false | tee pylint-result.txt
- run: cat pylint-result.txt
# - name: "Check Pylint Score > 8.2/10"
# if: ${{ matrix.platform != 'windows-latest' }}
# env:
# PYLINT_THRESHOLD: 8.2
# run: |
# SCORE=`sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' pylint-result.txt`
# echo "SCORE -> $SCORE"
# # threshold check
# if awk "BEGIN {exit !($SCORE >= $PYLINT_THRESHOLD)}"; then
# echo "PyLint Passed | Score: ${SCORE} | Threshold: ${PYLINT_THRESHOLD}"
# else
# echo "PyLint Failed | Score: ${SCORE} | Threshold: ${PYLINT_THRESHOLD}"
# exit 1
# fi
# - name: Run tox -e prospector
# if: ${{ matrix.platform != 'windows-latest' }}
# run: tox -e prospector -vv -s false
- name: Run Pylint on Production Code
run: tox -vv -s false -e pylint | tee /tmp/pylint-result-prod-code.txt
- name: Run Pylint on Test Code
run: tox -vv -s false -e pylint -- tests | tee /tmp/pylint-result-test-code.txt
- name: Compute Average Pylint Score
run: |
PYLINT_PROD_SCORE=`sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' /tmp/pylint-result-prod-code.txt`
PYLINT_TEST_SCORE=`sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' /tmp/pylint-result-test-code.txt`
PYLINT_AVERAGE_SCORE=`echo "scale=2; ($PYLINT_PROD_SCORE + $PYLINT_TEST_SCORE) / 2" | bc`
echo "PYLINT_AVERAGE_SCORE=$PYLINT_AVERAGE_SCORE" >> $GITHUB_ENV
- name: "Check Pylint Score > 7.0/10"
if: ${{ matrix.platform != 'windows-latest' }}
env:
PYLINT_THRESHOLD: 7.0 # TODO: increase to 8.2
run: |
echo "SCORE: $PYLINT_AVERAGE_SCORE"
if awk "BEGIN {exit !($PYLINT_AVERAGE_SCORE >= $PYLINT_THRESHOLD)}"; then
echo "PyLint Passed -> Score: ${PYLINT_AVERAGE_SCORE}/10 >= Threshold: ${PYLINT_THRESHOLD}/10"
else
echo "PyLint Failed -> Score: ${PYLINT_AVERAGE_SCORE}/10 < Threshold: ${PYLINT_THRESHOLD}/10"
exit 1
fi
- name: Run tox -e prospector
if: ${{ matrix.platform != 'windows-latest' }}
run: |
# Manual code to "allow_failure" for the Job
tox -e prospector -vv -s false || exit_code=$?
if [[ "$exit_code" -ne 0 ]]; then
echo "[ERROR] Prospector Failed"
exit 0 # TODO: fix prospector to get rid of this code
fi

# DRAW PYTHON DEPENDENCY GRAPHS
check_trigger_draw_dependency_graphs:
Expand Down
Loading