Parallelize CI lint jobs
ci / lint-prettier (push) Successful in 8s
ci / lint-ruff (push) Successful in 4s
ci / lint-yaml (push) Successful in 5s
ci / lint-dockerfiles (push) Successful in 31s
ci / validate (push) Successful in 5s
ci / publish (push) Successful in 7s

This commit is contained in:
2026-06-28 00:57:21 +02:00
parent 26b6344f7a
commit 56f15e0ba5
2 changed files with 40 additions and 22 deletions
+20 -11
View File
@@ -13,7 +13,7 @@ env:
IMAGE_NAME: forust/telegram-scraper IMAGE_NAME: forust/telegram-scraper
jobs: jobs:
lint: lint-prettier:
runs-on: [self-hosted, linux, arch, homelab] runs-on: [self-hosted, linux, arch, homelab]
steps: steps:
- name: Checkout repository - name: Checkout repository
@@ -39,6 +39,12 @@ jobs:
node:22-alpine \ node:22-alpine \
sh -lc 'npx --yes prettier@3 --check --ignore-unknown "$@"' sh "${prettier_files[@]}" sh -lc 'npx --yes prettier@3 --check --ignore-unknown "$@"' sh "${prettier_files[@]}"
lint-ruff:
runs-on: [self-hosted, linux, arch, homelab]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Lint Python with Ruff - name: Lint Python with Ruff
shell: bash shell: bash
run: | run: |
@@ -48,6 +54,12 @@ jobs:
ghcr.io/astral-sh/ruff:latest \ ghcr.io/astral-sh/ruff:latest \
check . check .
lint-yaml:
runs-on: [self-hosted, linux, arch, homelab]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Lint YAML syntax - name: Lint YAML syntax
shell: bash shell: bash
run: | run: |
@@ -57,6 +69,12 @@ jobs:
cytopia/yamllint:latest \ cytopia/yamllint:latest \
-c .yamllint . -c .yamllint .
lint-dockerfiles:
runs-on: [self-hosted, linux, arch, homelab]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Lint Dockerfiles - name: Lint Dockerfiles
shell: bash shell: bash
run: | run: |
@@ -82,15 +100,6 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Lint YAML syntax
shell: bash
run: |
docker run --rm \
-v "$PWD:/work" \
-w /work \
cytopia/yamllint:latest \
-c .yamllint .
- name: Validate Kubernetes manifests - name: Validate Kubernetes manifests
shell: bash shell: bash
run: | run: |
@@ -114,7 +123,7 @@ jobs:
"${manifests[@]}" "${manifests[@]}"
publish: publish:
needs: [lint, validate] needs: [lint-prettier, lint-ruff, lint-yaml, lint-dockerfiles, validate]
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
runs-on: [self-hosted, linux, arch, homelab] runs-on: [self-hosted, linux, arch, homelab]
steps: steps:
+20 -11
View File
@@ -13,7 +13,7 @@ env:
IMAGE_NAME: forust/telegram-scraper IMAGE_NAME: forust/telegram-scraper
jobs: jobs:
lint: lint-prettier:
runs-on: [self-hosted, linux, arch, homelab] runs-on: [self-hosted, linux, arch, homelab]
steps: steps:
- name: Checkout repository - name: Checkout repository
@@ -39,6 +39,12 @@ jobs:
node:22-alpine \ node:22-alpine \
sh -lc 'npx --yes prettier@3 --check --ignore-unknown "$@"' sh "${prettier_files[@]}" sh -lc 'npx --yes prettier@3 --check --ignore-unknown "$@"' sh "${prettier_files[@]}"
lint-ruff:
runs-on: [self-hosted, linux, arch, homelab]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Lint Python with Ruff - name: Lint Python with Ruff
shell: bash shell: bash
run: | run: |
@@ -48,6 +54,12 @@ jobs:
ghcr.io/astral-sh/ruff:latest \ ghcr.io/astral-sh/ruff:latest \
check . check .
lint-yaml:
runs-on: [self-hosted, linux, arch, homelab]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Lint YAML syntax - name: Lint YAML syntax
shell: bash shell: bash
run: | run: |
@@ -57,6 +69,12 @@ jobs:
cytopia/yamllint:latest \ cytopia/yamllint:latest \
-c .yamllint . -c .yamllint .
lint-dockerfiles:
runs-on: [self-hosted, linux, arch, homelab]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Lint Dockerfiles - name: Lint Dockerfiles
shell: bash shell: bash
run: | run: |
@@ -82,15 +100,6 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Lint YAML syntax
shell: bash
run: |
docker run --rm \
-v "$PWD:/work" \
-w /work \
cytopia/yamllint:latest \
-c .yamllint .
- name: Validate Kubernetes manifests - name: Validate Kubernetes manifests
shell: bash shell: bash
run: | run: |
@@ -114,7 +123,7 @@ jobs:
"${manifests[@]}" "${manifests[@]}"
publish: publish:
needs: [lint, validate] needs: [lint-prettier, lint-ruff, lint-yaml, lint-dockerfiles, validate]
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
runs-on: [self-hosted, linux, arch, homelab] runs-on: [self-hosted, linux, arch, homelab]
steps: steps: