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

feat(ci): add common tests in ci #3578

Merged
merged 1 commit into from
Nov 28, 2024
Merged
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
42 changes: 37 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,43 @@ jobs:
name: backend-coverage
path: packages/backend/coverage

common:
name: Common package unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Set up Node.js lts
uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: Change TimeZone
uses: szenius/[email protected]
with:
timezoneLinux: "Europe/Paris"

- name: Set up Yarn cache
uses: c-hive/gha-yarn-cache@v2

- name: Install common dependencies
run: yarn workspaces focus @domifa/common

- name: Build common dependencies
run: yarn workspace @domifa/common build

- name: Run common tests
run: yarn workspace @domifa/common test --coverage --detectOpenHandles --forceExit

- name: Archive code coverage
uses: actions/upload-artifact@v4
with:
name: common-coverage
path: packages/common/coverage

frontend:
name: Front-end unit tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -137,11 +174,6 @@ jobs:
with:
node-version: "lts/*"

- name: Change TimeZone
uses: szenius/[email protected]
with:
timezoneLinux: "Europe/Paris"

- name: Set up Yarn cache
uses: c-hive/gha-yarn-cache@v2

Expand Down
Loading