This commit is contained in:
parent
da6339d74d
commit
6a699a481c
4 changed files with 21 additions and 13 deletions
|
@ -1,14 +1,19 @@
|
||||||
name: Run checks
|
name: Run checks
|
||||||
on: [ push, pull_request ]
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
jobs:
|
jobs:
|
||||||
checks:
|
checks:
|
||||||
runs-on: docker
|
runs-on: ubuntu-24.04
|
||||||
env:
|
env:
|
||||||
DIRECTORY: config
|
DIRECTORY: config
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: cd ${{ env.DIRECTORY }}
|
- run: lsb_release -a
|
||||||
- run: pip install -r requirements-dev.txt
|
- run: uname -srm
|
||||||
- run: ruff check
|
- uses: actions/setup-python@v5
|
||||||
- run: ruff format
|
with:
|
||||||
- run: myp
|
python-version: '3.13'
|
||||||
|
- run: pip install -r requirements.txt
|
||||||
|
- run: make check
|
10
Makefile
10
Makefile
|
@ -12,5 +12,11 @@ setup: ## Create Python virtualenv and install dependencies
|
||||||
@if [ ! -d .venv ]; then python3 -m venv .venv; fi
|
@if [ ! -d .venv ]; then python3 -m venv .venv; fi
|
||||||
@if [ -d .venv ]; then . .venv/bin/activate && pip3 install -r requirements.txt; fi
|
@if [ -d .venv ]; then . .venv/bin/activate && pip3 install -r requirements.txt; fi
|
||||||
|
|
||||||
check: ## Run linter, formatter and typechecks
|
check: ## Check linting, formatting and types
|
||||||
ruff check && ruff format && mypy config/master.cfg
|
ruff check
|
||||||
|
ruff format --check
|
||||||
|
mypy config/master.cfg
|
||||||
|
|
||||||
|
format: ## Autofix linting and formatting issues
|
||||||
|
ruff check --fix
|
||||||
|
ruff format
|
|
@ -3,9 +3,6 @@
|
||||||
import importlib
|
import importlib
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, os.path.expanduser("~/git/blender-devops/buildbot"))
|
|
||||||
|
|
||||||
import setup
|
import setup
|
||||||
importlib.reload(setup)
|
importlib.reload(setup)
|
||||||
BuildmasterConfig = setup.setup()
|
BuildmasterConfig = setup.setup()
|
||||||
|
|
|
@ -36,7 +36,7 @@ devops_host_id = os.environ.get("DEVOPS_HOST_ID", default="localhost")
|
||||||
|
|
||||||
|
|
||||||
def setup() -> Dict[str, Any]:
|
def setup() -> Dict[str, Any]:
|
||||||
####### MAIN CONFIGURATION
|
####### MAIN - configuration
|
||||||
c = {}
|
c = {}
|
||||||
|
|
||||||
# Change Source
|
# Change Source
|
||||||
|
|
Loading…
Reference in a new issue