Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHA automated testing #154

Merged
merged 3 commits into from
Jul 6, 2024
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
56 changes: 56 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "test"

on:
pull_request:
branches:
- main
- dev

push:
branches:
- '*'

techsavvyash marked this conversation as resolved.
Show resolved Hide resolved
jobs:
test-package:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/[email protected]

- name: Use Node.js
uses: actions/setup-node@v4

- name: Install Dependencies for packages/common
run: yarn install --frozen-lockfile
working-directory: packages/common

- name: Unit tests for packages/common
run: yarn run test
techsavvyash marked this conversation as resolved.
Show resolved Hide resolved
working-directory: packages/common/test/

test-sample:
runs-on: ubuntu-latest
strategy:
matrix:
dir:
- '02-monitoring'
- '03-response-formatting'
- '04-logging'
- '05-temporal-package'
- '06-file-upload'

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4

- name: Install Dependencies for ${{ matrix.dir }}
run: yarn install
working-directory: sample/${{ matrix.dir }}

- name: Run Unit Tests
run: yarn run test
working-directory: sample/${{ matrix.dir }}
2 changes: 1 addition & 1 deletion sample/06-file-upload/src/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { Injectable } from '@nestjs/common';
@Injectable()
export class AppService {
getHello(): string {
return 'Hello World from sample/07-file-upload!';
return 'Hello World from file upload.';
}
}
2 changes: 1 addition & 1 deletion sample/06-file-upload/test/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ describe('AppController (e2e)', () => {
return request(app.getHttpServer())
.get('/')
.expect(200)
.expect('Hello World!');
.expect('Hello World from file upload.');
});
});
Loading