Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85627752
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/.woodpecker/lint.yaml b/.woodpecker/lint.yaml
new file mode 100644
index 0000000..1855ad7
--- /dev/null
+++ b/.woodpecker/lint.yaml
@@ -0,0 +1,60 @@
+when:
+ - event: pull_request
+ path: [ "**/*.ex", "**/*.exs", "mix.lock", ".woodpecker/**" ]
+ - event: push
+ branch: ${CI_REPO_DEFAULT_BRANCH}
+ path: [ "**/*.ex", "**/*.exs", "mix.lock", ".woodpecker/**" ]
+
+labels:
+ platform: linux/amd64
+
+variables:
+ script_file_entrypoint: &script_file_entrypoint
+ - /bin/sh
+ - -c
+ - 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
+
+steps:
+ mix-format:
+ image: elixir:1.17-alpine
+ entrypoint: *script_file_entrypoint
+ failure: ignore
+ commands:
+ - apk add --no-cache build-base file-dev git
+ - mix local.hex --force
+ - mix local.rebar --force
+ - mix deps.get --only dev
+ - |
+ if ! mix format --check-formatted; then
+ touch fail.stamp
+ exit 1
+ fi
+
+ credo:
+ image: elixir:1.17-alpine
+ entrypoint: *script_file_entrypoint
+ failure: ignore
+ environment:
+ MIX_ENV: test
+ commands:
+ - apk add --no-cache build-base file-dev git
+ - mix local.hex --force
+ - mix local.rebar --force
+ - mix deps.get
+ - |
+ if ! mix credo; then
+ touch fail.stamp
+ exit 1
+ fi
+
+ ensure-status:
+ image: elixir:1.17-alpine
+ entrypoint: *script_file_entrypoint
+ commands: |
+ if test -f fail.stamp; then
+ echo "One or more previous steps failed. Failing workflow..."
+ exit 1
+ else
+ echo "All steps passed"
+ exit 0
+ fi
diff --git a/.woodpecker/unit-testing.yaml b/.woodpecker/unit-testing.yaml
new file mode 100644
index 0000000..2d3ae27
--- /dev/null
+++ b/.woodpecker/unit-testing.yaml
@@ -0,0 +1,31 @@
+when:
+ - event: pull_request
+ path: [ "**/*.ex", "**/*.exs", "mix.lock", "src/**", "Makefile", ".woodpecker/**" ]
+ - event: push
+ branch: ${CI_REPO_DEFAULT_BRANCH}
+ path: [ "**/*.ex", "**/*.exs", "mix.lock", "src/**", "Makefile", ".woodpecker/**" ]
+
+depends_on:
+ - lint
+
+labels:
+ platform: linux/amd64
+
+variables:
+ script_file_entrypoint: &script_file_entrypoint
+ - /bin/sh
+ - -c
+ - 'printf "%s" "$CI_SCRIPT" | base64 -d > /tmp/ci-script.sh && /bin/sh -xe /tmp/ci-script.sh'
+
+steps:
+ unit-testing:
+ image: elixir:1.17-alpine
+ entrypoint: *script_file_entrypoint
+ environment:
+ MIX_ENV: test
+ commands:
+ - apk add --no-cache build-base file-dev git
+ - mix local.hex --force
+ - mix local.rebar --force
+ - mix deps.get
+ - mix test --trace --preload-modules
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Aug 8, 3:33 AM (8 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1722851
Default Alt Text
(2 KB)
Attached To
Mode
R20 majic
Attached
Detach File
Event Timeline
Log In to Comment