Port back commits from blender-devops #1

Open
bartvdbraak wants to merge 13 commits from redo into main
5 changed files with 20 additions and 12 deletions
Showing only changes of commit 18e653fd2e - Show all commits

View file

@ -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: docker
container:
image: ghcr.io/catthehacker/ubuntu:act-22.04
env: env:
DIRECTORY: config DIRECTORY: config
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- run: cd ${{ env.DIRECTORY }} - uses: actions/setup-python@v5
- run: pip install -r requirements-dev.txt with:
- run: ruff check python-version: '3.13'
- run: ruff format - run: pip install -r requirements.txt
- run: myp - run: make check

0
Dockerfile Normal file
View file

View file

@ -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

View file

@ -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()

View file

@ -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