Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
TA2k committed Dec 29, 2023
1 parent 38bab23 commit 0a85ee8
Showing 1 changed file with 14 additions and 41 deletions.
55 changes: 14 additions & 41 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,76 +5,49 @@ name: Test and Release
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

strategy:
matrix:
node-version: [20.x]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: ioBroker/testing-action-check@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: npm install

- name: Lint source code
run: npm run lint
- name: Test package files
run: npm run test:package
node-version: '18.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

needs: [check-and-lint]

runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18.x, 20.x, 16.x]
node-version: [16.x, 18.x, 20.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: ioBroker/testing-action-adapter@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: npm install

- name: Run unit tests
run: npm run test:unit

- name: Run integration tests (unix only)
if: startsWith(runner.OS, 'windows') == false
run: DEBUG=testing:* npm run test:integration

- name: Run integration tests (windows only)
if: startsWith(runner.OS, 'windows')
run: set DEBUG=testing:* & npm run test:integration
os: ${{ matrix.os }}
# 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:
Expand Down

0 comments on commit 0a85ee8

Please sign in to comment.