Fix condition in pipeline (#5)
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: #5
This commit is contained in:
2023-07-23 22:47:13 +00:00
parent ec8fd7e2a7
commit e2a53a72ef

View File

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