ci: use self-hosted runner and simplify python steps
This commit is contained in:
@@ -7,24 +7,25 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-and-compile:
|
lint-and-compile:
|
||||||
runs-on: ubuntu-latest
|
# Prefer local Gitea runner labels to avoid pending/cancelled jobs.
|
||||||
|
runs-on: self-hosted
|
||||||
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Show environment
|
||||||
uses: actions/checkout@v4
|
run: |
|
||||||
|
pwd
|
||||||
- name: Setup Python
|
ls -la
|
||||||
uses: actions/setup-python@v5
|
python3 --version
|
||||||
with:
|
|
||||||
python-version: "3.11"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
pip install -r requirements.txt
|
python3 -m pip install -r requirements.txt
|
||||||
|
|
||||||
- name: Compile Python files
|
- name: Compile Python files
|
||||||
run: |
|
run: |
|
||||||
python -m py_compile app/*.py
|
python3 -m py_compile app/*.py
|
||||||
|
|||||||
Reference in New Issue
Block a user