Skip to content

Commit c912394

Browse files
Merge pull request #2 from olha-dev-fullstack/dev
Dev
2 parents bb1386f + 6becd22 commit c912394

File tree

5 files changed

+36
-147
lines changed

5 files changed

+36
-147
lines changed

.github/workflows/dev.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,14 @@ jobs:
3636
echo "AUTH_SECRET=${{ secrets.AUTH_SECRET }}" >> dev.env
3737
echo "JWT_EXPIRES_IN=${{ secrets.JWT_EXPIRES_IN }}" >> dev.env
3838
echo "PORT=${{ secrets.PORT }}" >> dev.env
39-
build:
39+
test:
40+
runs-on: [self-hosted, dev]
4041
needs: create_env
42+
steps:
43+
- name: Run tests
44+
run: npm run test
45+
build:
46+
needs: [create_env, test]
4147
runs-on: [self-hosted, dev]
4248
steps:
4349
- name: Build website

.github/workflows/production.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@ jobs:
3232
echo "AUTH_SECRET=${{ secrets.AUTH_SECRET }}" >> production.env
3333
echo "JWT_EXPIRES_IN=${{ secrets.JWT_EXPIRES_IN }}" >> production.env
3434
echo "PORT=${{ vars.PORT }}" >> production.env
35+
test:
36+
runs-on: [self-hosted, prod]
37+
steps:
38+
- name: Run tests
39+
run: npm run test
3540
build:
36-
needs: create_env
41+
needs: [create_env, test]
3742
runs-on: [self-hosted, prod]
3843
steps:
3944
- name: Build website

.github/workflows/run-tests.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Run tests
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Get code
11+
uses: actions/checkout@v4
12+
- name: Cache dependencies
13+
id: cache
14+
uses: actions/cache@v4
15+
with:
16+
path: node_modules
17+
key: deps-node-modules-${{ hashFiles('**/package-lock.json') }}
18+
- name: Install dependencies
19+
if: steps.cache.outputs.cache-hit != 'true'
20+
run: npm ci
21+
- name: Run tests
22+
run: npm run test

src/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import { SchoolModule } from './school/school.module';
4747
},
4848
{
4949
provide: 'APP_NAME',
50-
useValue: 'The best Nest events backend',
50+
useValue: 'The Nest events application backend',
5151
},
5252
{
5353
provide: 'MESSAGE',

src/events/event.service.spec.ts

Lines changed: 0 additions & 144 deletions
This file was deleted.

0 commit comments

Comments
 (0)