Workflows

This commit is contained in:
Bastian Wagner
2024-11-28 12:15:04 +01:00
parent 540011fd57
commit 70c56e4d0b
3 changed files with 35 additions and 11 deletions

View File

@@ -1,19 +1,13 @@
name: Docker Image CI for GHCR
on:
push:
workflow_run:
workflows: ["Run Unit-Tests"]
types:
- completed
branches:
- master
jobs:
test_frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Unit-Tests
run: |
cd client
npm install
npm run test
build_and_publish_backend:
runs-on: ubuntu-latest
steps:

26
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Run Unit-Tests
on:
push:
branches: ["*"] # Alle Branches
tags: ["*"] # Alle Tags
jobs:
test_frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Unit-Tests Frontend
run: |
cd client
npm install
npm run test
test_backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Unit-Tests Backend
run: |
cd api
npm install
npm run test

View File

@@ -27,11 +27,15 @@ export class SystemService {
}
findOne(id: string) {
return `This action returns a #${id} system`;
return this.systemRepo.findOne({ where: { id: id } });
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
update(id: string, updateSystemDto: UpdateSystemDto) {
throw new HttpException(
`This action updates a #${id} system but is not implemented`,
HttpStatus.NOT_IMPLEMENTED,
);
return `This action updates a #${id} system`;
}