From b366ea80008beaa3c918477adb4b19226c9c7d3d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 27 May 2026 15:35:17 +0200 Subject: [PATCH] update github workflows Signed-off-by: Vladimir Mandic --- .github/workflows/lint.yaml | 75 +++++++++++++++++++ .github/workflows/on_pull_request.yaml | 37 --------- .github/workflows/pages.yml | 53 +++++++++++++ .../{build_readme.yaml => sponsors.yaml} | 2 +- 4 files changed, 129 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/lint.yaml delete mode 100644 .github/workflows/on_pull_request.yaml create mode 100644 .github/workflows/pages.yml rename .github/workflows/{build_readme.yaml => sponsors.yaml} (95%) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 000000000..7fe6c7571 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,75 @@ +name: lint + +on: + - push + - pull_request + +jobs: + lint: + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + flags: + - --test --uv + + steps: + - name: checkout-code + uses: actions/checkout@main + + - name: install-uv + run: curl -LsSf https://astral.sh/uv/install.sh | sh + + - name: setup-python + uses: actions/setup-python@main + with: + python-version: 3.12.3 + + - name: install-python-deps + run: uv pip install ruff pylint pre-commit + + - name: setup-node + uses: actions/setup-node@main + with: + node-version: 24 + + - name: install-pnpm + run: npm install -g pnpm + + - name: pnpm-store-path + id: pnpm-store + run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - name: cache-pnpm-store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-store.outputs.STORE_PATH }} + key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: | + pnpm-store- + + - name: install-node-deps + run: pnpm install --frozen-lockfile + + - name: pre-commit + uses: pre-commit-ci/lite-action@v1.1.0 + if: always() + with: + msg: apply code formatting and linting auto-fixes + + - name: eslint + run: pnpm run eslint + + - name: tsc + run: pnpm run tsc + + - name: ruff + run: uv run ruff check + + - name: pylint + run: uv run pylint *.py modules/ pipelines/ scripts/ extensions-builtin/ + + - name: test + run: | + export COMMANDLINE_ARGS="${{ matrix.flags }}" + uv run python launch.py diff --git a/.github/workflows/on_pull_request.yaml b/.github/workflows/on_pull_request.yaml deleted file mode 100644 index 352e8a5ac..000000000 --- a/.github/workflows/on_pull_request.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: lint-on-push - -on: - - push - - pull_request - -jobs: - lint: - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - flags: - - --debug --test --uv - - --debug --test - steps: - - name: checkout-code - uses: actions/checkout@main - - name: setup-python - uses: actions/setup-python@main - with: - python-version: 3.12.3 - cache: pip - cache-dependency-path: requirements.txt - - name: install-pylint - run: | - python -m pip install --upgrade pip - pip install pylint - - name: pre-commit - uses: pre-commit-ci/lite-action@v1.1.0 - if: always() - with: - msg: apply code formatting and linting auto-fixes - - name: test-startup - run: | - export COMMANDLINE_ARGS="${{ matrix.flags }}" - python launch.py diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 000000000..cf8ba5e51 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,53 @@ +name: github-pages + +on: + push: + branches: + - pages + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: pages-checkout + uses: actions/checkout@v4 + + - name: pages-build + run: python3 scripts/build-pages.py + + - name: pages-ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.2' + bundler-cache: true + + - name: pages-dependencies + run: bundle install + + - name: pages-site + run: bundle exec jekyll build --destination ./_site + + - name: pages-upload + uses: actions/upload-pages-artifact@v3 + with: + path: ./_site + + deploy: + needs: build + runs-on: ubuntu-latest + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: pages-deploy + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/build_readme.yaml b/.github/workflows/sponsors.yaml similarity index 95% rename from .github/workflows/build_readme.yaml rename to .github/workflows/sponsors.yaml index d10a563ef..68a6e9a49 100644 --- a/.github/workflows/build_readme.yaml +++ b/.github/workflows/sponsors.yaml @@ -1,4 +1,4 @@ -name: update-readme +name: readme-sponsors on: workflow_dispatch: