3 on: [pull_request, push]
8 group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9 cancel-in-progress: ${{ github.head_ref != '' }}
14 runs-on: ubuntu-latest
17 - name: Checkout repository
18 uses: actions/checkout@v4
20 - name: Setup python (auxiliary scripts)
21 uses: actions/setup-python@v5
23 python-version: '3' # use default version
25 - name: Install tools (auxiliary scripts)
26 run: pip install bandit pycodestyle pyflakes
28 - name: Gather files (auxiliary scripts)
30 export "PY_FILES=$(find . -type f -name '*.py' ! -path '*searchengine*' -printf '%p ')"
32 echo "PY_FILES=$PY_FILES" >> "$GITHUB_ENV"
34 - name: Lint code (auxiliary scripts)
37 bandit --skip B314,B405 $PY_FILES
39 - name: Format code (auxiliary scripts)
42 --max-line-length=1000 \
46 - name: Build code (auxiliary scripts)
48 python -m compileall $PY_FILES
50 - name: Setup python (search engine)
51 uses: actions/setup-python@v5
55 - name: Install tools (search engine)
56 run: pip install bandit mypy pycodestyle pyflakes pyright
58 - name: Gather files (search engine)
60 export "PY_FILES=$(find . -type f -name '*.py' -path '*searchengine*' ! -name 'socks.py' -printf '%p ')"
62 echo "PY_FILES=$PY_FILES" >> "$GITHUB_ENV"
64 - name: Check typings (search engine)
66 MYPYPATH="src/searchengine/nova3" \
68 --follow-imports skip \
74 - name: Lint code (search engine)
77 bandit --skip B110,B310,B314,B405 $PY_FILES
79 - name: Format code (search engine)
83 --max-line-length=1000 \
87 - name: Build code (search engine)
89 python -m compileall $PY_FILES