-
-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (63 loc) · 2.26 KB
/
test-and-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Test and Release
# Run this job on all pushes and pull requests
# as well as tags with a semantic version
on:
push:
branches:
- "master"
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: '18.x'
lint: true
lint-command: 'npm run lint .'
adapter-tests:
if: contains(github.event.head_commit.message, '[skip ci]') == false
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: ioBroker/testing-action-adapter@v1
with:
node-version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
extra-tests: npm run test:js
deploy:
needs: [check-and-lint, adapter-tests]
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: ioBroker/testing-action-deploy@v1
with:
node-version: '18.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-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
#sentry-project: "iobroker-comfoairq"
#sentry-version-prefix: "iobroker.comfoairq"
# If your sentry project is linked to a GitHub repository, you can enable the following option
# sentry-github-integration: true