From a88bb4d4070dfefd66b40dcc7ca2b10d86322374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=BCster?= Date: Sun, 10 Oct 2021 14:53:28 +0200 Subject: [PATCH 1/3] Create tests.yml --- .github/workflows/tests.yml | 74 +++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..b77f687 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,74 @@ +name: Test suite + +on: + push: + branches: + - master # allthough master is push protected we still keep it + - dev + pull_request: # runs on all PR + +jobs: + # ---------------------------------- + # uncomment when a linter is added + # ---------------------------------- + + # lintjs: + # name: Javascript lint + # runs-on: ubuntu-latest + # steps: + # - name: checkout + # uses: actions/checkout@v2 + # + # - name: setup node + # uses: actions/setup-node@v1 + # with: + # node-version: '12.x' + # + # - name: cache dependencies + # uses: actions/cache@v1 + # with: + # path: ~/.npm + # key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + # restore-keys: | + # ${{ runner.os }}-node- + # - run: npm ci + # - run: npm run lint + + unittest: + name: unit tests + runs-on: ubuntu-latest + # uncomment when a linter is added + # needs: [lintjs] + steps: + - name: checkout + uses: actions/checkout@v2 + + - name: setup node + uses: actions/setup-node@v1 + with: + node-version: '12.x' + + - name: cache dependencies + uses: actions/cache@v1 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - run: npm ci + - run: npm run test + # uncomment when coverage is added + - run: npm run test:coverage + + # ---------------------------------- + # uncomment when a linter is added + # ---------------------------------- + + # - name: check coverage + # uses: devmasx/coverage-check-action@v1.2.0 + # with: + # type: lcov + # result_path: coverage/lcov.info + # min_coverage: 90 + # token: ${{github.token}} + From 917b4b9011c637647e02bb507864e4e87a944093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=BCster?= Date: Sun, 10 Oct 2021 14:57:24 +0200 Subject: [PATCH 2/3] uncomment line for coverage test until cov is added --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b77f687..ddb46cc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,7 +58,7 @@ jobs: - run: npm ci - run: npm run test # uncomment when coverage is added - - run: npm run test:coverage + # - run: npm run test:coverage # ---------------------------------- # uncomment when a linter is added From dcd8a3df7d833f066bbc507fa23e2792012def6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=BCster?= Date: Sun, 10 Oct 2021 15:14:56 +0200 Subject: [PATCH 3/3] ci change push branch dev to development --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ddb46cc..2bc2786 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,7 +4,7 @@ on: push: branches: - master # allthough master is push protected we still keep it - - dev + - development pull_request: # runs on all PR jobs: