diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c6c1107..0586377 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,16 +1,34 @@ -lint: - stage: test +stages: + - lint + - build + +deno_lint: + stage: lint image: denoland/deno:latest script: - cd cli - - make lint + - deno lint -build: +deno_build: stage: build image: denoland/deno:latest script: - cd cli - - make build + - deno compile --import-map ./import_map.json --allow-read --allow-write -o ../kollagen main.ts artifacts: paths: - - cli/kollagen + - kollagen + +app_build: + stage: build + image: node:lts + script: + - node --version && npm --version + - make app + cache: + key: ${CI_COMMIT_REF_SLUG} + paths: + - .npm + artifacts: + paths: + - dist diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..65d5ab2 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +all: deno_lint deno app + +deno_lint: + cd cli && deno lint + +deno: + cd cli && deno compile --import-map ./import_map.json --allow-read --allow-write -o ../kollagen main.ts + +app: + npm ci --cache .npm --prefer-offline && npm run build \ No newline at end of file diff --git a/cli/Makefile b/cli/Makefile deleted file mode 100644 index f7a0b4c..0000000 --- a/cli/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -all: lint build - -lint: - deno lint - -build: - deno compile --import-map ./import_map.json --allow-read --allow-write -o kollagen main.ts \ No newline at end of file