Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,14 @@ jobs:
echo "AUTH_SECRET=${{ secrets.AUTH_SECRET }}" >> dev.env
echo "JWT_EXPIRES_IN=${{ secrets.JWT_EXPIRES_IN }}" >> dev.env
echo "PORT=${{ secrets.PORT }}" >> dev.env
build:
test:
runs-on: [self-hosted, dev]
needs: create_env
steps:
- name: Run tests
run: npm run test
build:
needs: [create_env, test]
runs-on: [self-hosted, dev]
steps:
- name: Build website
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ jobs:
echo "AUTH_SECRET=${{ secrets.AUTH_SECRET }}" >> production.env
echo "JWT_EXPIRES_IN=${{ secrets.JWT_EXPIRES_IN }}" >> production.env
echo "PORT=${{ vars.PORT }}" >> production.env
test:
runs-on: [self-hosted, prod]
steps:
- name: Run tests
run: npm run test
build:
needs: create_env
needs: [create_env, test]
runs-on: [self-hosted, prod]
steps:
- name: Build website
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Run tests
on:
push:
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Get code
uses: actions/checkout@v4
- name: Cache dependencies
id: cache
uses: actions/cache@v4
with:
path: node_modules
key: deps-node-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Run tests
run: npm run test
2 changes: 1 addition & 1 deletion src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import { SchoolModule } from './school/school.module';
},
{
provide: 'APP_NAME',
useValue: 'The best Nest events backend',
useValue: 'The Nest events application backend',
},
{
provide: 'MESSAGE',
Expand Down
144 changes: 0 additions & 144 deletions src/events/event.service.spec.ts

This file was deleted.