summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authortusooa <tusooa@kazv.moe>2023-05-02 22:12:15 -0400
committertusooa <tusooa@kazv.moe>2023-05-02 22:12:15 -0400
commit99f157e2804327d4ad3f47b83638060f774a582b (patch)
tree16a736fb5e8c0c061284591e6bbfb00f8e71187e /.gitlab-ci.yml
parentae8f359f22d8d02c2937df0a81052fc3504d4248 (diff)
Fix MR pipelines not having build and test jobs
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml43
1 files changed, 20 insertions, 23 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2eee3bc68..b70415ac6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -56,24 +56,27 @@ check-changelog:
- apk add git
- sh ./tools/check-changelog
+.build_changes_policy:
+ rules:
+ - changes:
+ - ".gitlab-ci.yml"
+ - "**/*.ex"
+ - "**/*.exs"
+ - "mix.lock"
+
build:
+ extends: .build_changes_policy
stage: build
- only:
- changes: &build_changes_policy
- - ".gitlab-ci.yml"
- - "**/*.ex"
- - "**/*.exs"
- - "mix.lock"
script:
- mix compile --force
spec-build:
stage: test
- only:
- changes:
- - ".gitlab-ci.yml"
- - "lib/pleroma/web/api_spec/**/*.ex"
- - "lib/pleroma/web/api_spec.ex"
+ rules:
+ - changes:
+ - ".gitlab-ci.yml"
+ - "lib/pleroma/web/api_spec/**/*.ex"
+ - "lib/pleroma/web/api_spec.ex"
artifacts:
paths:
- spec.json
@@ -95,9 +98,8 @@ benchmark:
- mix pleroma.load_testing
unit-testing:
+ extends: .build_changes_policy
stage: test
- only:
- changes: *build_changes_policy
cache: &testing_cache_policy
<<: *global_cache_policy
policy: pull
@@ -118,11 +120,10 @@ unit-testing:
path: coverage.xml
unit-testing-erratic:
+ extends: .build_changes_policy
stage: test
retry: 2
allow_failure: true
- only:
- changes: *build_changes_policy
cache: &testing_cache_policy
<<: *global_cache_policy
policy: pull
@@ -153,9 +154,8 @@ unit-testing-erratic:
# - mix test --trace --only federated
unit-testing-rum:
+ extends: .build_changes_policy
stage: test
- only:
- changes: *build_changes_policy
cache: *testing_cache_policy
services:
- name: minibikini/postgres-with-rum:12
@@ -171,10 +171,9 @@ unit-testing-rum:
- mix test --preload-modules
lint:
+ extends: .build_changes_policy
image: &current_elixir elixir:1.12-alpine
stage: test
- only:
- changes: *build_changes_policy
cache: *testing_cache_policy
before_script: &current_bfr_script
- apk update
@@ -186,18 +185,16 @@ lint:
- mix format --check-formatted
analysis:
+ extends: .build_changes_policy
stage: test
- only:
- changes: *build_changes_policy
cache: *testing_cache_policy
script:
- mix credo --strict --only=warnings,todo,fixme,consistency,readability
cycles:
+ extends: .build_changes_policy
image: *current_elixir
stage: test
- only:
- changes: *build_changes_policy
cache: {}
before_script: *current_bfr_script
script: