diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..46538d4 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,49 @@ +# CI/CD Release Workflow +name: nodejs + +on: + push: + +env: + COMMIT_SHA: ${{ github.event.pull_request.head.sha }} + PULL_NUMBER: ${{ github.event.pull_request.number }} + RUN_ID: ${{ github.run_id }} + FORCE_COLOR: 2 + +jobs: + pipeline: + name: Node ${{ matrix.node-version }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + node-version: ['16.x'] + os: ['ubuntu-latest'] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v3 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install project + run: yarn --prefer-offline + id: install + + - name: Build project + run: yarn run build + id: production diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 3ff97ac..33710d8 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -3,8 +3,6 @@ name: pipeline on: pull_request: - branches: - - 'trunk' tags-ignore: - '*' push: diff --git a/tsconfig.json b/tsconfig.json index 5b654b7..6363812 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,23 +2,36 @@ "compilerOptions": { "allowSyntheticDefaultImports": false, "esModuleInterop": false, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "removeComments": true, + "incremental": true, + "tsBuildInfoFile": "./", "preserveValueImports": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "allowUnreachableCode": false, - "strictFunctionTypes": true, + "strictPropertyInitialization": true, + "strictNullChecks": true, + "strictFunctionTypes": true, "isolatedModules": true, "declaration": true, "sourceMap": false, "module": "ES2020", "moduleResolution": "node", "target": "ESNext", - "rootDir": "src", - "outDir": "dist", - "types" : ["@types/node/events"] + "rootDir": "./src", + "outDir": "./dist", + "types": [ + "@types/node/events" + ] }, "include": [ - "src" + "src/**/*.ts" ], - "exclude": ["**/node_modules", "**/.*/"], + "exclude": [ + "**/node_modules", + "**/.*/", + "src/**/*.test.ts" + ] }