mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 17:56:21 +00:00
ci: caches
This commit is contained in:
parent
e0a2149483
commit
0569f7cab9
1 changed files with 23 additions and 4 deletions
|
@ -2,18 +2,27 @@
|
||||||
- "apk add go-task diffutils"
|
- "apk add go-task diffutils"
|
||||||
.disable-hainish: &disable-hainish
|
.disable-hainish: &disable-hainish
|
||||||
- "echo \"HAINISH=\" >> .env.production"
|
- "echo \"HAINISH=\" >> .env.production"
|
||||||
|
.cache-ruby: &cache-ruby
|
||||||
|
- paths:
|
||||||
|
- "vendor/ruby"
|
||||||
|
.cache-node: &cache-node
|
||||||
|
- paths:
|
||||||
|
- "node_modules"
|
||||||
|
.cache-task: &cache-task
|
||||||
|
- paths:
|
||||||
|
- ".task"
|
||||||
image: "gitea.nulo.in/sutty/panel:3.17.3-3.1.4-rails"
|
image: "gitea.nulo.in/sutty/panel:3.17.3-3.1.4-rails"
|
||||||
variables:
|
variables:
|
||||||
RAILS_ENV: "production"
|
RAILS_ENV: "production"
|
||||||
LC_ALL: "C.UTF-8"
|
LC_ALL: "C.UTF-8"
|
||||||
HAINISH: ""
|
HAINISH: ""
|
||||||
cache:
|
cache:
|
||||||
paths:
|
|
||||||
- "vendor/ruby"
|
|
||||||
- "node_modules"
|
|
||||||
- ".task"
|
|
||||||
assets:
|
assets:
|
||||||
stage: "deploy"
|
stage: "deploy"
|
||||||
|
cache:
|
||||||
|
- *cache-ruby
|
||||||
|
- *cache-node
|
||||||
|
- *cache-task
|
||||||
before_script:
|
before_script:
|
||||||
- "git config --global user.email \"${GIT_USER_EMAIL:-$GITLAB_USER_EMAIL}\""
|
- "git config --global user.email \"${GIT_USER_EMAIL:-$GITLAB_USER_EMAIL}\""
|
||||||
- "git config --global user.name \"${GIT_USER_NAME:-$GITLAB_USER_NAME}\""
|
- "git config --global user.name \"${GIT_USER_NAME:-$GITLAB_USER_NAME}\""
|
||||||
|
@ -28,6 +37,8 @@ assets:
|
||||||
- "git push -o ci.skip"
|
- "git push -o ci.skip"
|
||||||
gem-audit:
|
gem-audit:
|
||||||
stage: "test"
|
stage: "test"
|
||||||
|
cache:
|
||||||
|
- *cache-ruby
|
||||||
before_script:
|
before_script:
|
||||||
- "gem install bundler-audit"
|
- "gem install bundler-audit"
|
||||||
- *apk-add
|
- *apk-add
|
||||||
|
@ -36,6 +47,8 @@ gem-audit:
|
||||||
- "go-task gem-audit"
|
- "go-task gem-audit"
|
||||||
node-audit:
|
node-audit:
|
||||||
stage: "test"
|
stage: "test"
|
||||||
|
cache:
|
||||||
|
- *cache-node
|
||||||
before_script:
|
before_script:
|
||||||
- *apk-add
|
- *apk-add
|
||||||
- *disable-hainish
|
- *disable-hainish
|
||||||
|
@ -44,6 +57,8 @@ node-audit:
|
||||||
- "go-task node-audit"
|
- "go-task node-audit"
|
||||||
brakeman:
|
brakeman:
|
||||||
stage: "test"
|
stage: "test"
|
||||||
|
cache:
|
||||||
|
- *cache-ruby
|
||||||
rules:
|
rules:
|
||||||
- if: "$CI_PIPELINE_SOURCE == 'merge_request_event'"
|
- if: "$CI_PIPELINE_SOURCE == 'merge_request_event'"
|
||||||
before_script:
|
before_script:
|
||||||
|
@ -53,6 +68,8 @@ brakeman:
|
||||||
- "go-task bundle -- exec brakeman"
|
- "go-task bundle -- exec brakeman"
|
||||||
rubocop:
|
rubocop:
|
||||||
stage: "test"
|
stage: "test"
|
||||||
|
cache:
|
||||||
|
- *cache-ruby
|
||||||
rules:
|
rules:
|
||||||
- if: "$CI_PIPELINE_SOURCE == 'merge_request_event'"
|
- if: "$CI_PIPELINE_SOURCE == 'merge_request_event'"
|
||||||
before_script:
|
before_script:
|
||||||
|
@ -62,6 +79,8 @@ rubocop:
|
||||||
- "./bin/modified_files | grep .rb | xargs -r go-task bundle -- exec rubocop"
|
- "./bin/modified_files | grep .rb | xargs -r go-task bundle -- exec rubocop"
|
||||||
haml:
|
haml:
|
||||||
stage: "test"
|
stage: "test"
|
||||||
|
cache:
|
||||||
|
- *cache-ruby
|
||||||
rules:
|
rules:
|
||||||
- if: "$CI_PIPELINE_SOURCE == 'merge_request_event'"
|
- if: "$CI_PIPELINE_SOURCE == 'merge_request_event'"
|
||||||
before_script:
|
before_script:
|
||||||
|
|
Loading…
Reference in a new issue