diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml
index f52bb3902..c6f89f132 100644
--- a/.woodpecker/test.yml
+++ b/.woodpecker/test.yml
@@ -52,7 +52,7 @@ pipeline:
environment:
- WOODPECKER_DATABASE_DRIVER=sqlite3
commands:
- - make test-server-datastore
+ - make test-server-datastore-coverage
when:
path:
# related config files
@@ -93,6 +93,18 @@ pipeline:
- "**/*.go"
- "go.*"
+ codecov:
+ pull: true
+ image: woodpeckerci/plugin-codecov:next-alpine
+ settings:
+ files:
+ - agent-coverage.out
+ - cli-coverage.out
+ - server-coverage.out
+ - datastore-coverage.out
+ token:
+ from_secret: codecov_token
+
services:
service-postgres:
image: postgres:11
diff --git a/Makefile b/Makefile
index 245c99281..6ac7fcd03 100644
--- a/Makefile
+++ b/Makefile
@@ -50,16 +50,19 @@ lint-frontend:
(cd web/; yarn lint --quiet)
test-agent:
- go test -race -cover -coverprofile coverage.out -timeout 30s github.com/woodpecker-ci/woodpecker/cmd/agent github.com/woodpecker-ci/woodpecker/agent/...
+ go test -race -cover -coverprofile agent-coverage.out -timeout 30s github.com/woodpecker-ci/woodpecker/cmd/agent github.com/woodpecker-ci/woodpecker/agent/...
test-server:
- go test -race -cover -coverprofile coverage.out -timeout 30s github.com/woodpecker-ci/woodpecker/cmd/server $(shell go list github.com/woodpecker-ci/woodpecker/server/... | grep -v '/store')
+ go test -race -cover -coverprofile server-coverage.out -timeout 30s github.com/woodpecker-ci/woodpecker/cmd/server $(shell go list github.com/woodpecker-ci/woodpecker/server/... | grep -v '/store')
test-cli:
- go test -race -cover -coverprofile coverage.out -timeout 30s github.com/woodpecker-ci/woodpecker/cmd/cli github.com/woodpecker-ci/woodpecker/cli/...
+ go test -race -cover -coverprofile cli-coverage.out -timeout 30s github.com/woodpecker-ci/woodpecker/cmd/cli github.com/woodpecker-ci/woodpecker/cli/...
test-server-datastore:
- go test -cover -coverprofile coverage.out -timeout 30s github.com/woodpecker-ci/woodpecker/server/store/...
+ go test -race -timeout 30s github.com/woodpecker-ci/woodpecker/server/store/...
+
+test-server-datastore-coverage:
+ go test -race -cover -coverprofile datastore-coverage.out -timeout 30s github.com/woodpecker-ci/woodpecker/server/store/...
test-frontend: frontend-dependencies
(cd web/; yarn run lint)
diff --git a/README.md b/README.md
index ec0f68977..eb5b0a009 100644
--- a/README.md
+++ b/README.md
@@ -8,6 +8,9 @@
+
+
+
diff --git a/docs/docs/20-usage/50-environment.md b/docs/docs/20-usage/50-environment.md
index 4708cef64..fc7e1a5e6 100644
--- a/docs/docs/20-usage/50-environment.md
+++ b/docs/docs/20-usage/50-environment.md
@@ -47,7 +47,7 @@ pipeline:
This is the reference list of all environment variables available to your pipeline containers. These are injected into your pipeline step and plugins containers, at runtime.
| NAME | Description |
-| ------------------------------ | -------------------------------------------------------------------------------------------- |
+|--------------------------------|----------------------------------------------------------------------------------------------|
| `CI=woodpecker` | environment is woodpecker |
| | **Repository** |
| `CI_REPO` | repository full name `/` |
@@ -63,7 +63,7 @@ This is the reference list of all environment variables available to your pipeli
| `CI_COMMIT_SHA` | commit sha |
| `CI_COMMIT_REF` | commit ref |
| `CI_COMMIT_REFSPEC` | commit ref spec |
-| `CI_COMMIT_BRANCH` | commit branch |
+| `CI_COMMIT_BRANCH` | commit branch (equals target branch for pull requests) |
| `CI_COMMIT_SOURCE_BRANCH` | commit source branch |
| `CI_COMMIT_TARGET_BRANCH` | commit target branch |
| `CI_COMMIT_TAG` | commit tag name (empty if event is not `tag`) |
@@ -110,14 +110,14 @@ This is the reference list of all environment variables available to your pipeli
| `CI_PREV_BUILD_CREATED` | previous build created unix timestamp |
| `CI_PREV_BUILD_STARTED` | previous build started unix timestamp |
| `CI_PREV_BUILD_FINISHED` | previous build finished unix timestamp |
-| | |
+| | |
| `CI_WORKSPACE` | Path of the workspace where source code gets cloned to |
| | **System** |
| `CI_SYSTEM_NAME` | name of the ci system: `woodpecker` |
| `CI_SYSTEM_LINK` | link to ci system |
| `CI_SYSTEM_HOST` | hostname of ci server |
| `CI_SYSTEM_VERSION` | version of the server |
-| | **Internal** - Please don't use! |
+| | **Internal** - Please don't use! |
| `CI_SCRIPT` | Internal script path. Used to call pipeline step commands. |
| `CI_NETRC_USERNAME` | Credentials for private repos to be able to clone data. (Only available for specific images) |
| `CI_NETRC_PASSWORD` | Credentials for private repos to be able to clone data. (Only available for specific images) |