From d0f84df01bd0beb29954803f07a9f5eb30fb7b14 Mon Sep 17 00:00:00 2001 From: Ponlawat W Date: Sat, 25 Nov 2023 09:25:08 +0700 Subject: [PATCH] 0.2.0 - Built to ESModule (#3) * Moved to ESModule * Bumped node version in GitHub Workflows * Added job when unit tests are finished --- .github/workflows/publish.yml | 2 +- .github/workflows/unit-tests.yml | 14 ++++++++++++-- examples/index.html | 2 +- package-lock.json | 4 ++-- package.json | 8 ++++---- tests/overpass-api.test.ts | 2 +- tests/overpass-osm.test.ts | 7 ++++--- tests/source-node.test.ts | 6 +++--- tests/source-way.test.ts | 8 ++++---- tsconfig.json | 5 +++-- webpack.config.js | 18 +++++++++++++++--- 11 files changed, 50 insertions(+), 26 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index aba5d4c..4a22f93 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,7 +18,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 20 registry-url: https://registry.npmjs.org/ - name: Install run: npm ci diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 5401941..611eef7 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -2,7 +2,11 @@ name: Unit Tests on: workflow_call jobs: unit-tests: - name: Unit Tests + strategy: + fail-fast: true + matrix: + node: [16, 18, 20] + name: Unit Tests Node ${{ matrix.node }} runs-on: ubuntu-latest steps: - name: Checkout @@ -12,8 +16,14 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 16 + node-version: ${{ matrix.node }} - name: Install run: npm ci - name: Test run: npm run test + unit-tests-finished: + name: Unit Tests Finished + needs: unit-tests + runs-on: ubuntu-latest + steps: + - run: exit 0 diff --git a/examples/index.html b/examples/index.html index 6b030f7..65d82cf 100644 --- a/examples/index.html +++ b/examples/index.html @@ -22,7 +22,7 @@ - +