Skip to content

fixed ci errors

fixed ci errors #14

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: {}
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: actions/checkout@v2
- name: Install dependencies
run: npm ci --verbose
- uses: ioBroker/testing-action-check@v1
with:
node-version: "22.x"
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: [18.x, 20.x, 22.x]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: npm ci --verbose
- name: Install ioBroker on Linux and macOS
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
curl -sL https://iobroker.net/install.sh | bash -
- name: Install ioBroker on Windows
if: runner.os == 'Windows'
run: |
npm install -g iobroker
iobroker host this
- name: Stop ioBroker
run: iobroker stop
- name: Install adapter from GitHub
run: |
iobroker url https://github.com/weberk/ioBroker.uvr16xx-blnet --host $(hostname)
iobroker upload uvr16xx-blnet
- name: Start ioBroker
run: iobroker start
- uses: ioBroker/testing-action-adapter@v1
with:
node-version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
# 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
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: npm ci --verbose
- uses: ioBroker/testing-action-deploy@v1
with:
node-version: "14.x"
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-uvr1611-bl-net"
# sentry-version-prefix: "iobroker.uvr1611-bl-net"
# # If your sentry project is linked to a GitHub repository, you can enable the following option
# # sentry-github-integration: true