From 04da46344aecff22b193924723074f246de60e54 Mon Sep 17 00:00:00 2001 From: iwg-vpn <96304220+iwg-vpn@users.noreply.github.com> Date: Thu, 19 Oct 2023 15:29:16 +0200 Subject: [PATCH 1/2] test-and-release.yaml added --- .github/workflows/test-and-release.yaml | 92 +++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 .github/workflows/test-and-release.yaml diff --git a/.github/workflows/test-and-release.yaml b/.github/workflows/test-and-release.yaml new file mode 100644 index 0000000..06f1bc5 --- /dev/null +++ b/.github/workflows/test-and-release.yaml @@ -0,0 +1,92 @@ +name: Test and Release + +# Run this job on all pushes and pull requests +# as well as tags with a semantic version +on: + push: + branches: + - "main" + tags: + # normal versions + - "v[0-9]+.[0-9]+.[0-9]+" + # pre-releases + - "v[0-9]+.[0-9]+.[0-9]+-**" + pull_request: {} + +# Cancel previous PR/branch runs when a new commit is pushed +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + # Performs quick checks before the expensive test runs + check-and-lint: + if: contains(github.event.head_commit.message, '[skip ci]') == false + + runs-on: ubuntu-latest + + steps: + - uses: ioBroker/testing-action-check@v1 + with: + node-version: '16.x' + # Uncomment the following line if your adapter cannot be installed using 'npm ci' + # install-command: 'npm install' + lint: true + + # Runs adapter tests on all supported node versions and OSes + adapter-tests: + if: contains(github.event.head_commit.message, '[skip ci]') == false + + runs-on: ${{ matrix.os }} + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - uses: ioBroker/testing-action-adapter@v1 + with: + node-version: ${{ matrix.node-version }} + os: ${{ matrix.os }} + # Uncomment the following line if your adapter cannot be installed using 'npm ci' + # install-command: 'npm install' + +# TODO: To enable automatic npm releases, create a token on npmjs.org +# Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options +# Then uncomment the following block: + +# # Deploys the final package to NPM +# deploy: +# needs: [check-and-lint, adapter-tests] +# +# # Trigger this step only when a commit on any branch is tagged with a version number +# if: | +# contains(github.event.head_commit.message, '[skip ci]') == false && +# github.event_name == 'push' && +# startsWith(github.ref, 'refs/tags/v') +# +# runs-on: ubuntu-latest +# +# # Write permissions are required to create Github releases +# permissions: +# contents: write +# +# steps: +# - uses: ioBroker/testing-action-deploy@v1 +# with: +# node-version: '16.x' +# # Uncomment the following line if your adapter cannot be installed using 'npm ci' +# # install-command: 'npm install' +# npm-token: ${{ secrets.NPM_TOKEN }} +# github-token: ${{ secrets.GITHUB_TOKEN }} +# +# # When using Sentry for error reporting, Sentry can be informed about new releases +# # To enable create a API-Token in Sentry (User settings, API keys) +# # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options +# # Then uncomment and customize the following block: +# sentry: true +# sentry-token: ${{ secrets.SENTRY_AUTH_TOKEN }} +# sentry-project: "iobroker-template" +# sentry-version-prefix: "iobroker.template" +# # If your sentry project is linked to a GitHub repository, you can enable the following option +# # sentry-github-integration: true From cd420a8fe655598ffc49be7b6ff46828e25b7624 Mon Sep 17 00:00:00 2001 From: iwg-vpn <96304220+iwg-vpn@users.noreply.github.com> Date: Thu, 19 Oct 2023 15:33:50 +0200 Subject: [PATCH 2/2] 14->20 --- .github/workflows/test-and-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-and-release.yaml b/.github/workflows/test-and-release.yaml index 06f1bc5..adb51be 100644 --- a/.github/workflows/test-and-release.yaml +++ b/.github/workflows/test-and-release.yaml @@ -40,7 +40,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [14.x, 16.x, 18.x] + node-version: [16.x, 18.x, 20.x] os: [ubuntu-latest, windows-latest, macos-latest] steps: