Ensure that the linters and builds pass before merging a PR #7
18
.woodpecker/.audit.yaml
Normal file
18
.woodpecker/.audit.yaml
Normal 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
|
@@ -2,7 +2,6 @@ steps:
|
||||
- name: renovate
|
||||
image: renovate/renovate
|
||||
pull: true
|
||||
settings:
|
||||
commands:
|
||||
- renovate $${CI_REPO}
|
||||
environment:
|
||||
|
@@ -13,4 +13,5 @@ steps:
|
||||
from_secret: registry-password
|
||||
|
||||
when:
|
||||
- path: ./docker/Dockerfile.ci-lint-audit
|
||||
- event: push
|
||||
path: ./docker/Dockerfile.ci-lint-audit
|
||||
|
45
.woodpecker/.lint.yaml
Normal file
45
.woodpecker/.lint.yaml
Normal 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
|
@@ -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}
|
Reference in New Issue
Block a user