-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.46 KB
/
pr-testing.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
name: PR testing
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
jobs:
test-pr:
name: Test NodeJS PR - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Set git to use LF #to once and for all finish neverending fight between Unix and Windows
run: |
git config --global core.autocrlf false
git config --global core.eol lf
shell: bash
- name: Checkout repository
uses: actions/checkout@v4
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "${{ steps.lockversion.outputs.version }}"
- #npm cli 10 is buggy because of some cache issue
name: Install npm cli 8
shell: bash
run: npm install -g [email protected]
- name: Install dependencies
shell: bash
run: npm ci
- name: Test
run: npm test --if-present
- if: matrix.os == 'ubuntu-latest'
#linting should run just one and not on all possible operating systems
name: Run linter
run: npm run lint --if-present
- name: Run release assets generation to make sure PR does not break it
shell: bash
run: npm run generate:assets --if-present