Use Node image for test stage and only build for tags
This commit is contained in:
+11
-15
@@ -15,40 +15,36 @@
|
|||||||
# this program. If not, see <http s ://www.gnu.org/licenses/>.
|
# this program. If not, see <http s ://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
image: fedora:latest
|
|
||||||
|
|
||||||
cache:
|
|
||||||
paths:
|
|
||||||
- .dnf_cache
|
|
||||||
- node_modules
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- build
|
- build
|
||||||
|
|
||||||
before_script:
|
|
||||||
- mkdir -p .dnf_cache
|
|
||||||
- dnf --setopt=cachedir=$(pwd)/.dnf_cache --setopt=keepcache=True update -y
|
|
||||||
- dnf --setopt=cachedir=$(pwd)/.dnf_cache --setopt=keepcache=True install -y make
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
|
image: node:latest
|
||||||
rules:
|
rules:
|
||||||
- changes:
|
- changes:
|
||||||
- src/**/*
|
- src/**/*
|
||||||
- tests/**/*
|
- tests/**/*
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- node_modules
|
||||||
script:
|
script:
|
||||||
- dnf --setopt=cachedir=$(pwd)/.dnf_cache --setopt=keepcache=True install -y node npm
|
|
||||||
- make deps-install
|
- make deps-install
|
||||||
- make test
|
- make test
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
|
image: fedora:latest
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
|
|
||||||
- if: $CI_COMMIT_TAG
|
- if: $CI_COMMIT_TAG
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .dnf_cache
|
||||||
script:
|
script:
|
||||||
- dnf --setopt=cachedir=$(pwd)/.dnf_cache --setopt=keepcache=True install -y gnome-shell gettext
|
- mkdir -p .dnf_cache
|
||||||
|
- dnf --setopt=cachedir=$(pwd)/.dnf_cache --setopt=keepcache=True update -y
|
||||||
|
- dnf --setopt=cachedir=$(pwd)/.dnf_cache --setopt=keepcache=True install -y make gnome-shell gettext
|
||||||
- make build
|
- make build
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "$CI_COMMIT_REF_NAME"
|
name: "$CI_COMMIT_REF_NAME"
|
||||||
|
|||||||
Reference in New Issue
Block a user