diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index 5241813e0..f61f930cb 100644 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -50,10 +50,10 @@ jobs: run: | set -eu python --version - python -m pip --version - python -m black --version - python -m isort --version-number - python -m flake8 --version + python3 -m pip --version + python3 -m black --version + python3 -m isort --version-number + python3 -m flake8 --version bandit --version pytest --version echo "CI environment is ready" @@ -62,10 +62,10 @@ jobs: shell: sh run: | set -eu - python -m compileall -q alembic apps packages tests scripts - python -m black --check alembic apps packages tests scripts - python -m isort --check-only alembic apps packages tests scripts - python -m flake8 apps packages tests --count --statistics + python3 -m compileall -q alembic apps packages tests scripts + python3 -m black --check alembic apps packages tests scripts + python3 -m isort --check-only alembic apps packages tests scripts + python3 -m flake8 apps packages tests --count --statistics - name: Run security scan shell: sh @@ -86,16 +86,16 @@ jobs: run: | set -eu DATABASE_URL=postgresql+psycopg://postgres:postgres@localhost:5432/xiaoxia_saas \ - python -m alembic upgrade head --sql > /tmp/alembic-upgrade.sql + python3 -m alembic upgrade head --sql > /tmp/alembic-upgrade.sql test -s /tmp/alembic-upgrade.sql grep -q "Running upgrade" /tmp/alembic-upgrade.sql - python scripts/check_schema_metadata.py + python3 scripts/check_schema_metadata.py - name: Run tests shell: sh run: | set -eu - PYTHONPATH="$PWD/apps/api:$PWD" python -m pytest tests/unit -q + PYTHONPATH="$PWD/apps/api:$PWD" python3 -m pytest tests/unit -q - name: Build summary if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'