use standard GitHub actions (checkout, setup-python)
This commit is contained in:
parent
cc9168e58d
commit
c86af50271
@ -10,21 +10,18 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
run: |
|
|
||||||
git config --global --add safe.directory "$GITEA_WORKSPACE"
|
|
||||||
ls -la "$GITEA_WORKSPACE"
|
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
run: |
|
uses: actions/setup-python@v5
|
||||||
python3 --version
|
with:
|
||||||
pip3 --version
|
python-version: "3.11"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip3 install ruff mypy
|
pip install ruff mypy
|
||||||
pip3 install -e ".[dev]"
|
pip install -e ".[dev]"
|
||||||
|
|
||||||
- name: Run ruff
|
- name: Run ruff
|
||||||
run: ruff check .
|
run: ruff check .
|
||||||
@ -35,30 +32,26 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
run: |
|
|
||||||
git config --global --add safe.directory "$GITEA_WORKSPACE"
|
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
run: |
|
uses: actions/setup-python@v5
|
||||||
python3 --version
|
with:
|
||||||
pip3 --version
|
python-version: "3.11"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip3 install -e ".[dev]"
|
pip install -e ".[dev]"
|
||||||
pip3 install -r requirements-api.txt
|
pip install -r requirements-api.txt
|
||||||
|
|
||||||
- name: Run pytest
|
- 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:
|
docker-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
run: |
|
|
||||||
git config --global --add safe.directory "$GITEA_WORKSPACE"
|
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: |
|
run: |
|
||||||
@ -67,18 +60,16 @@ jobs:
|
|||||||
security:
|
security:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
run: |
|
|
||||||
git config --global --add safe.directory "$GITEA_WORKSPACE"
|
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
run: |
|
uses: actions/setup-python@v5
|
||||||
python3 --version
|
with:
|
||||||
pip3 --version
|
python-version: "3.11"
|
||||||
|
|
||||||
- name: Run bandit (Python SAST)
|
- name: Run bandit (Python SAST)
|
||||||
run: |
|
run: |
|
||||||
pip3 install bandit
|
pip install bandit
|
||||||
bandit -r youtube_cli/ youtube_tui/ web/server/ -ll
|
bandit -r youtube_cli/ youtube_tui/ web/server/ -ll
|
||||||
|
|
||||||
build-result:
|
build-result:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user