-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (47 loc) · 1.5 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
name: Test
# Run this job on all pushes and pull requests
# as well as tags with a semantic version
on:
push:
branches:
- "*"
pull_request: { }
# Cancel previous PR/branch runs when a new commit is pushed
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: 1
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: 22.x
install-command: 'corepack enable && yarn install'
lint-command: 'yarn run lint'
test-command: 'yarn run test:package'
type-checking: true
lint: true
# Runs adapter tests on all supported node versions and OSes
adapter-tests:
if: contains(github.event.head_commit.message, '[skip ci]') == false
needs: [ check-and-lint ]
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [ 20.x, 22.x ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: ioBroker/testing-action-adapter@v1
with:
node-version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
install-command: 'corepack enable && yarn install'
unit-test-command: 'yarn run test:unit'
integration-test-command: 'yarn run test:integration'
build-command: 'yarn run build'
build: true