From ec13879848095707ede0e161cbbc7105be11e92d Mon Sep 17 00:00:00 2001 From: tiagosiebler Date: Fri, 9 Sep 2022 12:40:31 +0100 Subject: [PATCH] github CI test --- .github/workflows/integrationtest.yml | 36 +++++++++++++++++++++++++++ jest.config.js | 6 ++--- 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/integrationtest.yml diff --git a/.github/workflows/integrationtest.yml b/.github/workflows/integrationtest.yml new file mode 100644 index 0000000..369bfab --- /dev/null +++ b/.github/workflows/integrationtest.yml @@ -0,0 +1,36 @@ +name: "Build & Test" + +on: [push] + +# on: +# # pull_request: +# # branches: +# # - "master" +# push: +# branches: + +jobs: + build: + name: "Build, Test & Validate" + runs-on: ubuntu-latest + + steps: + - name: "Checkout source code" + uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + + - name: Install + run: npm ci --ignore-scripts + + - name: Build + run: npm run build + + - name: Test + run: npm run test + env: + API_KEY_COM: ${{ secrets.API_KEY_COM }} + API_SECRET_COM: ${{ secrets.API_SECRET_COM }} diff --git a/jest.config.js b/jest.config.js index 32b968b..8f22e92 100644 --- a/jest.config.js +++ b/jest.config.js @@ -6,10 +6,10 @@ module.exports = { __PROD__: false }, testEnvironment: 'node', - preset: "ts-jest", + preset: 'ts-jest', verbose: true, // report individual test bail: false, // enable to stop test when an error occur, - detectOpenHandles: false, + detectOpenHandles: true, moduleDirectories: ['node_modules', 'src', 'test'], testMatch: ['**/test/**/*.test.ts?(x)'], testPathIgnorePatterns: ['node_modules/', 'dist/', '.json'], @@ -25,4 +25,4 @@ module.exports = { statements: -10 } } -}; \ No newline at end of file +};