👷 Split lint and audit jobs and fix woodpecker linter warns
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/audit Pipeline was successful

This commit is contained in:
2025-05-02 09:00:03 +02:00
parent 4671a5ee51
commit acbe15ed69
5 changed files with 65 additions and 60 deletions

18
.woodpecker/.audit.yaml Normal file
View File

@@ -0,0 +1,18 @@
variables:
- shared-config: &shared-config
image: rg.fr-par.scw.cloud/asr-projects/beau-gosse-du-92/ci-lint-audit:latest
pull: true
steps:
- name: dependencies
<<: *shared-config
commands: |
cargo deny check
# Not ready to block PR on fail
failure: ignore
when:
- event: pull_request
depends_on:
- lint

View File

@@ -2,7 +2,6 @@ steps:
- name: renovate - name: renovate
image: renovate/renovate image: renovate/renovate
pull: true pull: true
settings:
commands: commands:
- renovate $${CI_REPO} - renovate $${CI_REPO}
environment: environment:

View File

@@ -13,4 +13,5 @@ steps:
from_secret: registry-password from_secret: registry-password
when: when:
- path: ./docker/Dockerfile.ci-lint-audit - event: push
path: ./docker/Dockerfile.ci-lint-audit

45
.woodpecker/.lint.yaml Normal file
View File

@@ -0,0 +1,45 @@
variables:
- shared-config: &shared-config
image: rg.fr-par.scw.cloud/asr-projects/beau-gosse-du-92/ci-lint-audit:latest
pull: true
steps:
- name: format
<<: *shared-config
commands: |
cargo fmt --all --check
- name: sort derives
<<: *shared-config
commands: |
cargo sort-derives --check
- name: clippy
<<: *shared-config
commands: |
cargo clippy --all --all-features -- -D warnings
# Not ready to block PR on fail
failure: ignore
- name: spellcheck
<<: *shared-config
commands: |
cargo spellcheck
- name: dependencies
<<: *shared-config
commands: |
cargo udeps
- name: dockerizable (web)
image: woodpeckerci/plugin-kaniko
settings:
registry: rg.fr-par.scw.cloud
repo: asr-projects/beau-gosse-du-92-web
username: nologin
password:
from_secret: registry-password
dry-run: true
when:
- event: pull_request

View File

@@ -1,58 +0,0 @@
variables:
- &image rg.fr-par.scw.cloud/asr-projects/beau-gosse-du-92/ci-lint-audit:latest
steps:
- name: lint - format
image: *image
pull: true
commands: |
cargo fmt --all --check
- name: lint - sort derives
image: *image
pull: true
commands: |
cargo sort-derives --check
- name: lint - clippy
image: *image
pull: true
commands: |
cargo clippy --all --all-features -- -D warnings
# Not ready to block PR on fail
failure: ignore
- name: lint - spellcheck
image: *image
pull: true
commands: |
cargo spellcheck
- name: lint - dependencies
image: *image
pull: true
commands: |
cargo udeps
- name: build - web (dockerize)
image: woodpeckerci/plugin-kaniko
settings:
registry: rg.fr-par.scw.cloud
repo: asr-projects/beau-gosse-du-92-web
username: nologin
password:
from_secret: registry-password
dry-run: true
- name: audit - dependencies
image: *image
pull: true
commands: |
cargo deny check
# Not ready to block PR on fail
failure: ignore
when:
- event: pull_request
# - event: push
# branch: ${CI_REPO_DEFAULT_BRANCH}