Upgrade woodpecker config
ci/woodpecker/pr/woodpecker Pipeline was successful
Details
ci/woodpecker/pr/woodpecker Pipeline was successful
Details
- Pipeline changed its name to steps. - Default checkout was target branch, conflicting with our fetch. - Spliting fetch and actual tests for readability. - Cannot split apt install as each step runs in a separated - container (clean way would be to create an image with hunspell in it). Also I don't remember why there's those git things here, so let's try without…
This commit is contained in:
parent
bd6abaadbb
commit
af33329364
|
@ -1,13 +1,37 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
pipeline:
|
# `make verifs` only checks changed files, so it make sense only on
|
||||||
|
# pull requests.
|
||||||
|
|
||||||
|
# Also we're using `branch: "$CI_COMMIT_SOURCE_BRANCH"` because the
|
||||||
|
# default branch name is the target branch, conflicting with the fact
|
||||||
|
# the Makefile tries to compare the current branch to the target
|
||||||
|
# branch...
|
||||||
|
|
||||||
|
when:
|
||||||
|
event: pull_request
|
||||||
|
|
||||||
|
clone:
|
||||||
|
git:
|
||||||
|
image: woodpeckerci/plugin-git
|
||||||
|
pull: true
|
||||||
|
settings:
|
||||||
|
branch: ${CI_COMMIT_SOURCE_BRANCH}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
fetch target branch:
|
||||||
|
image: python
|
||||||
|
commands:
|
||||||
|
- BRANCH="$(make print-BRANCH)"
|
||||||
|
- git fetch origin --no-tags +refs/heads/$BRANCH
|
||||||
|
- git branch $BRANCH origin/$BRANCH
|
||||||
|
- git branch -va
|
||||||
|
|
||||||
test:
|
test:
|
||||||
image: python
|
image: python
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -y hunspell hunspell-fr-comprehensive
|
- apt-get install -y hunspell hunspell-fr-comprehensive
|
||||||
- python3 -m pip install -r requirements.txt
|
- python3 -m pip install -r requirements.txt
|
||||||
- BRANCH="$(grep ^BRANCH Makefile | awk '{print $3}')"
|
- make diff
|
||||||
- git fetch origin --no-tags +refs/heads/$BRANCH
|
|
||||||
- 'git branch $BRANCH origin/$BRANCH ||:'
|
|
||||||
- make verifs
|
- make verifs
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -192,3 +192,11 @@ clean:
|
||||||
find -name '*.mo' -delete
|
find -name '*.mo' -delete
|
||||||
@echo "Cleaning build directory"
|
@echo "Cleaning build directory"
|
||||||
$(MAKE) -C venv/cpython/Doc/ clean
|
$(MAKE) -C venv/cpython/Doc/ clean
|
||||||
|
|
||||||
|
.PHONY: diff
|
||||||
|
diff:
|
||||||
|
@echo "Files changed between $(BRANCH) and HEAD:"
|
||||||
|
@echo $(shell git diff --name-only --diff-filter=d $(BRANCH))
|
||||||
|
|
||||||
|
print-%:
|
||||||
|
@echo $($*)
|
||||||
|
|
Loading…
Reference in New Issue