name: Testing permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test-autogen: name: Test AutoGen Code runs-on: self-hosted steps: - uses: actions/checkout@v4 with: ref: ${{ github.sha }} - name: Check Autogen Code is up to dated run: | PYTHONPATH=libs/pyTermTk tools/autogenForwarded.py --apply if [[ $(git status --porcelain) ]] ; then git diff echo "❌ PR failed due to missing release files:" echo " - run: PYTHONPATH=libs/pyTermTk tools/autogenForwarded.py --apply" echo " and push the generated files" exit 1 else echo "✅ - Release Clean" fi test-pyTermTk: name: Test pyTermTk # runs-on: ubuntu-latest runs-on: self-hosted strategy: fail-fast: false matrix: python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - name: Check allowed imports run: | # Stop the build if some unexpected import is found tools/check.import.sh - name: Install dependencies shell: bash run: | python -m pip install --upgrade pip python -m pip install -e '.[test]' - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude .venv,build,tmp # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: pytest run: | DDDD=$(pwd) pytest ${DDDD}/tests/pytest pytest ${DDDD}/apps - name: Dumb Smoke Test run: | # To fix a folder permissin issue let's try to run the test from /tmp DDDD=$(pwd) mkdir -p /tmp/Eugenio cd /tmp/Eugenio # Download the input test mkdir -p tmp wget -O tmp/test.input.001.bin https://github.com/ceccopierangiolieugenio/binaryRepo/raw/master/pyTermTk/tests/test.input.001.bin wget -O tmp/test.input.002.bin https://github.com/ceccopierangiolieugenio/binaryRepo/raw/master/pyTermTk/tests/test.input.002.bin wget -O tmp/test.input.003.bin https://github.com/ceccopierangiolieugenio/binaryRepo/raw/master/pyTermTk/tests/test.input.003.bin pytest ${DDDD}/tests/pytest/run_*