feat(ci): Updated CI to only run jobs when changes have been made in certain directories

This commit is contained in:
Quinton den Haan 2024-05-30 22:47:21 +02:00
parent 0838473124
commit 56bb0ffdbc
3 changed files with 29 additions and 6 deletions

View file

@ -19,6 +19,9 @@ stages:
build:app:
stage: build
image: 'node:22.1.0-slim'
rules:
- changes:
- app/**/*
script:
- *pre_pnpm
- pnpm install
@ -32,6 +35,9 @@ build:app:
typecheck:app:
stage: typecheck
image: 'node:22.1.0-slim'
rules:
- changes:
- app/**/*
script:
- *pre_pnpm
- pnpm install --prefer-offline
@ -46,6 +52,9 @@ typecheck:app:
lint:app:
stage: lint
image: 'node:22.1.0-slim'
rules:
- changes:
- app/**/*
script:
- *pre_pnpm
- pnpm install --prefer-offline
@ -60,6 +69,9 @@ lint:app:
test:app:
stage: test
image: 'node:22.1.0-slim'
rules:
- changes:
- app/**/*
script:
- *pre_pnpm
- pnpm install --prefer-offline
@ -81,6 +93,9 @@ test:app:
build:kernel:
stage: build
image: python:3.12
rules:
- changes:
- kernel/**/*
script:
- *pre_poetry
- poetry install
@ -91,6 +106,9 @@ build:kernel:
lint:kernel:
stage: lint
image: python:3.12
rules:
- changes:
- kernel/**/*
script:
- *pre_poetry
- poetry install
@ -103,6 +121,9 @@ lint:kernel:
test:kernel:
stage: test
image: python:3.12
rules:
- changes:
- kernel/**/*
script:
- *pre_poetry
- apt update

View file

@ -1,3 +1,4 @@
def pre_mutation(context):
if context.filename == "response_examples.py":
context.skip = True

View file

@ -260,16 +260,17 @@ class ErrorRateValue(BaseModel):
wordLevel: WordLevelErrorRate
characterLevel: CharacterLevelErrorRate
class ErrorRateResponse(BaseModel):
"""
ErrorRateResponse model representing a files ground-truth and its error rates
Attributes:
errorRates list(ErrorRatesValue): list of calculated error rate metrics
groundTruth (str): String of the ground-truth
groundTruth (str): String of the ground-truth
"""
errorRates: list[ErrorRateValue]
groundTruth: str
groundTruth: str