ci: update config

This commit is contained in:
naskya 2024-05-10 21:39:13 +09:00
parent 2ca7bd65aa
commit ac57e4c019
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -61,6 +61,8 @@ default:
build: build:
stage: test stage: test
rules: rules:
- if: $TEST == 'false'
when: never
- if: $CI_COMMIT_BRANCH == 'develop' || $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_COMMIT_BRANCH == 'develop' || $CI_PIPELINE_SOURCE == 'merge_request_event'
changes: changes:
paths: paths:
@ -73,6 +75,7 @@ build:
- pnpm-lock.yaml - pnpm-lock.yaml
- Cargo.toml - Cargo.toml
- Cargo.lock - Cargo.lock
when: always
script: script:
- pnpm install --frozen-lockfile - pnpm install --frozen-lockfile
- pnpm run build:debug - pnpm run build:debug
@ -81,6 +84,8 @@ build:
build:client: build:client:
stage: test stage: test
rules: rules:
- if: $TEST == 'false'
when: never
- if: $CI_COMMIT_BRANCH == 'develop' || $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_COMMIT_BRANCH == 'develop' || $CI_PIPELINE_SOURCE == 'merge_request_event'
changes: changes:
paths: paths:
@ -120,6 +125,8 @@ build:container:
image: docker.io/debian:bookworm-slim image: docker.io/debian:bookworm-slim
services: [] services: []
rules: rules:
- if: $BUILD == 'false'
when: never
- if: $CI_COMMIT_BRANCH == 'develop' - if: $CI_COMMIT_BRANCH == 'develop'
changes: changes:
paths: paths:
@ -132,6 +139,7 @@ build:container:
- Cargo.lock - Cargo.lock
- Dockerfile - Dockerfile
- .dockerignore - .dockerignore
when: always
before_script: before_script:
- apt-get update && apt-get -y upgrade - apt-get update && apt-get -y upgrade
- apt-get install -y --no-install-recommends buildah ca-certificates fuse-overlayfs - apt-get install -y --no-install-recommends buildah ca-certificates fuse-overlayfs
@ -158,6 +166,10 @@ build:container:
cargo:test: cargo:test:
stage: test stage: test
rules: rules:
- if: $TEST == 'false'
when: never
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == 'main'
when: never
- if: $CI_COMMIT_BRANCH == 'develop' || $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_COMMIT_BRANCH == 'develop' || $CI_PIPELINE_SOURCE == 'merge_request_event'
changes: changes:
paths: paths:
@ -165,8 +177,7 @@ cargo:test:
- packages/macro-rs/**/* - packages/macro-rs/**/*
- Cargo.toml - Cargo.toml
- Cargo.lock - Cargo.lock
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == 'main' when: always
when: never
script: script:
- curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C /usr/local/cargo/bin - curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C /usr/local/cargo/bin
- pnpm install --frozen-lockfile - pnpm install --frozen-lockfile
@ -180,6 +191,10 @@ cargo:test:
cargo:clippy: cargo:clippy:
stage: test stage: test
rules: rules:
- if: $TEST == 'false'
when: never
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == 'main'
when: never
- if: $CI_COMMIT_BRANCH == 'develop' || $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_COMMIT_BRANCH == 'develop' || $CI_PIPELINE_SOURCE == 'merge_request_event'
changes: changes:
paths: paths:
@ -187,8 +202,7 @@ cargo:clippy:
- packages/macro-rs/**/* - packages/macro-rs/**/*
- Cargo.toml - Cargo.toml
- Cargo.lock - Cargo.lock
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == 'main' when: always
when: never
services: [] services: []
before_script: before_script:
- apt-get update && apt-get -y upgrade - apt-get update && apt-get -y upgrade