Woodpecker pipelines (#1)
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/all-checks-complete Pipeline was successful

Co-authored-by: Smaug123 <patrick+github@patrickstevens.co.uk>
Reviewed-on: #1
This commit is contained in:
2023-07-20 18:58:32 +00:00
parent f873e5ca3d
commit 45226e18ce
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
pipeline:
echo:
image: alpine
commands:
- echo "All required checks complete"
depends_on:
- build
skip_clone: true

21
.woodpecker/.build.yml Normal file
View File

@@ -0,0 +1,21 @@
pipeline:
build:
image: nixos/nix
commands:
- echo ${CI_BUILD_EVENT}
- echo ${CI_COMMIT_BRANCH}
- echo ${CI_REPO_DEFAULT_BRANCH}
# Lint
- nix --experimental-features 'nix-command flakes' develop --command cargo -- fmt --all -- --check
- nix --experimental-features 'nix-command flakes' develop --command cargo -- clippy -- -D warnings -W clippy::must_use_candidate
- nix --experimental-features 'nix-command flakes' develop .#ci --command alejandra -- --check .
- nix --experimental-features 'nix-command flakes' develop .#ci --command markdown-link-check README.md
# Test
- nix --experimental-features 'nix-command flakes' develop --command cargo test --verbose --release
- nix --experimental-features 'nix-command flakes' develop --command cargo test --verbose
# Run through Nix
- nix --experimental-features 'nix-command flakes' build
- nix --experimental-features 'nix-command flakes' run
when:
evaluate: '(CI_BUILD_EVENT == "push" && CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH) || (CI_BUILD_EVENT == "pull_request" && CI_COMMIT_BRANCH != CI_REPO_DEFAULT_BRANCH)'