Skip to content

Commit

Permalink
Merge pull request #105 from mbc-net/ci/test-multi-version-of-node
Browse files Browse the repository at this point in the history
ci: run test on multiple version of node
  • Loading branch information
koichimurakami authored Jan 2, 2025
2 parents 3e35cdb + 8804551 commit 9ed97f4
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 28 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/run-test-and-publish-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ jobs:
unit_tests:
name: Unit Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
Expand All @@ -36,7 +39,7 @@ jobs:
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Unit Tests Reporter
name: Unit Tests Reporter-${{ matrix.node-version }}
path: report/unit.xml
reporter: jest-junit
fail-on-error: 'true'
Expand All @@ -45,13 +48,16 @@ jobs:
name: E2e Test For Core package
needs: unit_tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
Expand All @@ -67,14 +73,14 @@ jobs:
name: 'upload artifact'
if: success() || failure()
with:
name: my-artifacts
name: core-report-artifact-${{ matrix.node-version }}
path: ./packages/core/test/scripts/*.out.txt

- name: E2E Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: E2E Core Tests Reporter
name: E2E Core Tests Reporter-${{ matrix.node-version }}
path: report/e2e-core.xml
reporter: jest-junit
fail-on-error: 'true'
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/run-test-develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ jobs:
unit_tests:
name: Unit Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
Expand All @@ -36,7 +39,7 @@ jobs:
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Unit Tests Reporter
name: Unit Tests Reporter-${{ matrix.node-version }}
path: report/unit.xml
reporter: jest-junit
fail-on-error: 'true'
Expand All @@ -45,13 +48,16 @@ jobs:
name: E2e Test For Core package
needs: unit_tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
Expand All @@ -67,14 +73,14 @@ jobs:
name: 'upload artifact'
if: success() || failure()
with:
name: my-artifacts
name: core-report-artifact-${{ matrix.node-version }}
path: ./packages/core/test/scripts/*.out.txt

- name: E2E Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: E2E Core Tests Reporter
name: E2E Core Tests Reporter-${{ matrix.node-version }}
path: report/e2e-core.xml
reporter: jest-junit
fail-on-error: 'true'
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "0.1.45-beta.0",
"version": "0.1.46-beta.0",
"packages": ["packages/*"]
}
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mbc-cqrs-serverless/cli",
"version": "0.1.45-beta.0",
"version": "0.1.46-beta.0",
"description": "a CLI to get started with MBC CQRS serverless framework",
"keywords": [
"mbc",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mbc-cqrs-serverless/core",
"version": "0.1.45-beta.0",
"version": "0.1.46-beta.0",
"description": "CQRS and event base core",
"keywords": [
"mbc",
Expand Down
4 changes: 2 additions & 2 deletions packages/sequence/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mbc-cqrs-serverless/sequence",
"version": "0.1.45-beta.0",
"version": "0.1.46-beta.0",
"description": "Generate increment sequence with time-rotation",
"keywords": [
"mbc",
Expand Down Expand Up @@ -41,6 +41,6 @@
"access": "public"
},
"dependencies": {
"@mbc-cqrs-serverless/core": "^0.1.45-beta.0"
"@mbc-cqrs-serverless/core": "^0.1.46-beta.0"
}
}
2 changes: 1 addition & 1 deletion packages/sequence/src/sequence-master-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class SequenceMasterDataProvider implements IMasterDataProvider {
if (!item) {
return this.defaultValue
}
return item
return item.attributes
} catch (error) {
return this.defaultValue
}
Expand Down
4 changes: 2 additions & 2 deletions packages/task/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mbc-cqrs-serverless/task",
"version": "0.1.45-beta.0",
"version": "0.1.46-beta.0",
"description": "long-running task",
"keywords": [
"mbc",
Expand Down Expand Up @@ -41,6 +41,6 @@
"access": "public"
},
"dependencies": {
"@mbc-cqrs-serverless/core": "^0.1.45-beta.0"
"@mbc-cqrs-serverless/core": "^0.1.46-beta.0"
}
}
4 changes: 2 additions & 2 deletions packages/ui-setting/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mbc-cqrs-serverless/ui-setting",
"version": "0.1.45-beta.0",
"version": "0.1.46-beta.0",
"description": "Setting master data",
"keywords": [
"mbc",
Expand Down Expand Up @@ -41,6 +41,6 @@
"access": "public"
},
"dependencies": {
"@mbc-cqrs-serverless/core": "^0.1.45-beta.0"
"@mbc-cqrs-serverless/core": "^0.1.46-beta.0"
}
}

0 comments on commit 9ed97f4

Please sign in to comment.