Merge pull request #782 from foxthefox/dependabot/github_actions/acti… #1447
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test and Release | |
| # Run this job on all pushes and pull requests | |
| # as well as tags with a semantic version | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| 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: [22.x] | |
| steps: | |
| - uses: ioBroker/testing-action-check@v2 | |
| with: | |
| node-version: '24.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 | |
| needs: [check-and-lint] | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| node-version: [22.x, 24.x] | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - uses: ioBroker/testing-action-adapter@v1 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| os: ${{ matrix.os }} | |
| - 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 | |
| deploy: | |
| needs: [check-and-lint, adapter-tests] | |
| # Permissions are required to create Github releases and npm trusted publishing | |
| permissions: | |
| contents: write | |
| id-token: write | |
| 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: '24.x' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |