[fix][Ticket #900284] Investigate metadata delay in case western #978
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
# This workflow will check for exceptions to raise properly and do not generate syntax errors. | |
# Also old code style using parenthesis in class definitions will be checked | |
name: Syntax checking | |
on: | |
[push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check exceptions | |
# Not related to tests, but to QA in general: Exceptions usually take only 1 argument | |
# So a comma is probably a sign of syntax error and should be replaced by a % | |
run: | | |
grep -IrE --colour 'raise .+".*%.*",' --include=*.py ./src/odemis ./scripts/ ./plugins/ || exit 0 | |
if [[ $? -eq 0 ]]; then | |
echo "Found the above syntax errors in exceptions, this is a sign that a comma should be replaced by a %." | |
exit 1 | |
fi | |
- name: Check old style classes | |
if: ${{ !cancelled() }} | |
# Only use parenthesis in class definition if there is inheritance (code-style) | |
run: | | |
grep -IrE --colour "class .+\(\).*:" --include=*.py ./src/odemis || exit 0 | |
if [[ $? -eq 0 ]]; then | |
echo "The above syntax errors were found, only use parenthesis in class definition if there is inheritance (code-style)." | |
exit 1 | |
fi |