Skip to content
Snippets Groups Projects
Commit 9da9b25b authored by Sebastian Mohr's avatar Sebastian Mohr
Browse files

Removed build stage in favor for publish stage as test should run without

build.
parent b5af71f6
No related branches found
No related tags found
No related merge requests found
Pipeline #564879 failed
......@@ -12,27 +12,26 @@ cache: &pnpm_cache
## Snips package
######################################
build:packages:snips:
test:packages:snips:
image: node:22-alpine
stage: build
stage: test
cache:
<<: *pnpm_cache
before_script:
# Install corepack and pnpm
- apk add --no-cache curl build-base
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- source $HOME/.cargo/env
- corepack enable
- corepack prepare pnpm@latest-9 --activate
- pnpm config set store-dir .pnpm-store
- pnpm install --frozen-lockfile
script:
# Build the package
- echo "Building @snip/snips"
- pnpm --filter snips... build
# TODO: publish to local registry
# Run the tests
- echo "Running tests for @snip/snips"
- pnpm --filter snips test
tags:
- docker
dependencies:
# Build artifacts from previous stages
- build:packages:snips
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
......@@ -40,35 +39,30 @@ build:packages:snips:
- when: on_failure
- when: manual
test:packages:snips:
publish:packages:snips:
image: node:22-alpine
stage: publish
cache:
<<: *pnpm_cache
before_script:
# Install corepack and pnpm
- apk add --no-cache curl build-base
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- source $HOME/.cargo/env
- corepack enable
- corepack prepare pnpm@latest-9 --activate
- pnpm config set store-dir .pnpm-store
- pnpm install --frozen-lockfile
script:
# Run the tests
- echo "Running tests for @snip/snips"
- pnpm --filter snips test
tags:
- docker
dependencies:
# Build artifacts from previous stages
- build:packages:snips
needs: ["build:packages:snips"]
publish:packages:snips:
before_script:
- pnpm config set @scope:registry https://${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/
- pnpm config set -- //${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken ${CI_JOB_TOKEN}
needs: ["build:packages:snips", "test:packages:snips"]
script:
# Build the package
- echo "Building @snip/snips"
- pnpm --filter snips... build
- pnpm --filter snips publish
tags:
- docker
needs: ["test:packages:snips"]
build:packages:config:
image: node:22-alpine
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment