Skip to content

Commit

Permalink
Merge pull request #107 from mbc-net/develop
Browse files Browse the repository at this point in the history
upgrade serverless to support mutil node version
  • Loading branch information
koichimurakami authored Jan 2, 2025
2 parents d26aec8 + 6b92773 commit 7a23448
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 14 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'
131 changes: 130 additions & 1 deletion 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/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"nestjs-spelunker": "^1.3.0",
"prettier": "^3.1.1",
"run-script-os": "^1.1.6",
"serverless": "^3.38.0",
"serverless": "^3.40.0",
"serverless-dynamodb": "^0.2.47",
"serverless-localstack": "^1.1.2",
"serverless-offline": "^13.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"ulid": "^2.3.0"
},
"devDependencies": {
"serverless": "^3.38.0",
"serverless": "^3.40.0",
"serverless-dynamodb": "^0.2.47",
"serverless-localstack": "^1.1.2",
"serverless-offline": "^13.3.2",
Expand Down
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

0 comments on commit 7a23448

Please sign in to comment.