diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index b4555bd..14435a9 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -10,21 +10,18 @@ jobs: lint: runs-on: ubuntu-latest steps: - - name: Checkout repository - run: | - git config --global --add safe.directory "$GITEA_WORKSPACE" - ls -la "$GITEA_WORKSPACE" + - uses: actions/checkout@v4 - name: Set up Python - run: | - python3 --version - pip3 --version + uses: actions/setup-python@v5 + with: + python-version: "3.11" - name: Install dependencies run: | - python3 -m pip install --upgrade pip - pip3 install ruff mypy - pip3 install -e ".[dev]" + python -m pip install --upgrade pip + pip install ruff mypy + pip install -e ".[dev]" - name: Run ruff run: ruff check . @@ -35,30 +32,26 @@ jobs: test: runs-on: ubuntu-latest steps: - - name: Checkout repository - run: | - git config --global --add safe.directory "$GITEA_WORKSPACE" + - uses: actions/checkout@v4 - name: Set up Python - run: | - python3 --version - pip3 --version + uses: actions/setup-python@v5 + with: + python-version: "3.11" - name: Install dependencies run: | - python3 -m pip install --upgrade pip - pip3 install -e ".[dev]" - pip3 install -r requirements-api.txt + python -m pip install --upgrade pip + pip install -e ".[dev]" + pip install -r requirements-api.txt - name: Run pytest - run: python3 -m pytest tests/ web/server/tests/ -v --tb=short + run: python -m pytest tests/ web/server/tests/ -v --tb=short docker-build: runs-on: ubuntu-latest steps: - - name: Checkout repository - run: | - git config --global --add safe.directory "$GITEA_WORKSPACE" + - uses: actions/checkout@v4 - name: Build Docker image run: | @@ -67,18 +60,16 @@ jobs: security: runs-on: ubuntu-latest steps: - - name: Checkout repository - run: | - git config --global --add safe.directory "$GITEA_WORKSPACE" + - uses: actions/checkout@v4 - name: Set up Python - run: | - python3 --version - pip3 --version + uses: actions/setup-python@v5 + with: + python-version: "3.11" - name: Run bandit (Python SAST) run: | - pip3 install bandit + pip install bandit bandit -r youtube_cli/ youtube_tui/ web/server/ -ll build-result: