mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 05:56:22 +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"
|
||||
.disable-hainish: &disable-hainish
|
||||
- "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"
|
||||
variables:
|
||||
RAILS_ENV: "production"
|
||||
LC_ALL: "C.UTF-8"
|
||||
HAINISH: ""
|
||||
cache:
|
||||
paths:
|
||||
- "vendor/ruby"
|
||||
- "node_modules"
|
||||
- ".task"
|
||||
assets:
|
||||
stage: "deploy"
|
||||
cache:
|
||||
- *cache-ruby
|
||||
- *cache-node
|
||||
- *cache-task
|
||||
before_script:
|
||||
- "git config --global user.email \"${GIT_USER_EMAIL:-$GITLAB_USER_EMAIL}\""
|
||||
- "git config --global user.name \"${GIT_USER_NAME:-$GITLAB_USER_NAME}\""
|
||||
|
@ -28,6 +37,8 @@ assets:
|
|||
- "git push -o ci.skip"
|
||||
gem-audit:
|
||||
stage: "test"
|
||||
cache:
|
||||
- *cache-ruby
|
||||
before_script:
|
||||
- "gem install bundler-audit"
|
||||
- *apk-add
|
||||
|
@ -36,6 +47,8 @@ gem-audit:
|
|||
- "go-task gem-audit"
|
||||
node-audit:
|
||||
stage: "test"
|
||||
cache:
|
||||
- *cache-node
|
||||
before_script:
|
||||
- *apk-add
|
||||
- *disable-hainish
|
||||
|
@ -44,6 +57,8 @@ node-audit:
|
|||
- "go-task node-audit"
|
||||
brakeman:
|
||||
stage: "test"
|
||||
cache:
|
||||
- *cache-ruby
|
||||
rules:
|
||||
- if: "$CI_PIPELINE_SOURCE == 'merge_request_event'"
|
||||
before_script:
|
||||
|
@ -53,6 +68,8 @@ brakeman:
|
|||
- "go-task bundle -- exec brakeman"
|
||||
rubocop:
|
||||
stage: "test"
|
||||
cache:
|
||||
- *cache-ruby
|
||||
rules:
|
||||
- if: "$CI_PIPELINE_SOURCE == 'merge_request_event'"
|
||||
before_script:
|
||||
|
@ -62,6 +79,8 @@ rubocop:
|
|||
- "./bin/modified_files | grep .rb | xargs -r go-task bundle -- exec rubocop"
|
||||
haml:
|
||||
stage: "test"
|
||||
cache:
|
||||
- *cache-ruby
|
||||
rules:
|
||||
- if: "$CI_PIPELINE_SOURCE == 'merge_request_event'"
|
||||
before_script:
|
||||
|
|
Loading…
Reference in a new issue