-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
180 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Publish new version on NPM | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3.1.0 | ||
- run: git fetch --progress --depth=1 origin ${{ github.base_ref }} | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3.5.1 | ||
with: | ||
node-version: 18.x | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: [setup] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3.1.0 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3.5.1 | ||
with: | ||
node-version: 18.x | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Lint | ||
run: npm run lint | ||
- name: Setup DynamoDB Local | ||
uses: rrainn/dynamodb-action@v3.0.0 | ||
with: | ||
port: 8022 | ||
cors: '*' | ||
- name: Run Unit Tests | ||
run: npm test | ||
- name: SonarCloud Scan | ||
uses: sonarsource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
|
||
build_and_publish: | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3.1.0 | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3.5.1 | ||
with: | ||
node-version: 18.x | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build | ||
run: npm run build | ||
- name: Publish | ||
run: npx semantic-release --dry-run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Test pull requests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- next | ||
- main | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3.1.0 | ||
- run: git fetch --progress --depth=1 origin ${{ github.base_ref }} | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3.5.1 | ||
with: | ||
node-version: 18.x | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
lint: | ||
runs-on: ubuntu-latest | ||
needs: [setup] | ||
steps: | ||
- uses: actions/checkout@v3.1.0 | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3.5.1 | ||
with: | ||
node-version: 18.x | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Lint | ||
run: npm run lint | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
needs: [setup] | ||
steps: | ||
- uses: actions/checkout@v3.1.0 | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3.5.1 | ||
with: | ||
node-version: 18.x | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build | ||
run: npm run build | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: [setup] | ||
steps: | ||
- uses: actions/checkout@v3.1.0 | ||
with: | ||
fetch-depth: 0 | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3.5.1 | ||
with: | ||
node-version: 18.x | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Lint | ||
run: npm run lint | ||
- name: Setup DynamoDB Local | ||
uses: rrainn/dynamodb-action@v3.0.0 | ||
with: | ||
port: 8022 | ||
cors: '*' | ||
- name: Run Unit Tests | ||
run: npm test:ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
{ | ||
"testEnvironment": "node", | ||
"roots": [ | ||
"<rootDir>/test" | ||
], | ||
"roots": ["<rootDir>/test"], | ||
"transform": { | ||
"^.+\\.tsx?$": "ts-jest" | ||
}, | ||
"maxConcurrency": 1, | ||
"testRegex": ".+\\.(test|spec)\\.tsx?$", | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx", | ||
"json", | ||
"node" | ||
], | ||
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"], | ||
"moduleNameMapper": { | ||
"@/(.*)": "<rootDir>/src/$1" | ||
}, | ||
"globalSetup": "<rootDir>/test/hooks/setup.ts", | ||
"globalTeardown": "<rootDir>/test/hooks/teardown.ts", | ||
"collectCoverageFrom": ["src/**/*.ts"] | ||
"collectCoverageFrom": ["src/**/*.ts"], | ||
"coverageReporters": ["lcov", "json", "html"] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.