Skip to content

Commit

Permalink
CI: Add node-hid requirements to all jobs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Sep 12, 2020
1 parent 1c499c9 commit e8a9eea
Showing 1 changed file with 46 additions and 17 deletions.
63 changes: 46 additions & 17 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,28 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [8.x, 10.x, 12.x, 13.x ]
node-version: [ 8.x, 10.x, 12.x, 13.x ]

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

- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

- name: Install node-hid requirements
run: sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev libudev-dev

- run: npm ci
- run: npm run build-all
- run: npm run test-node
- name: Install dependencies (and link per package)
run: npm ci

- name: Build CommonJS and ESM (from TypeScript)
run: npm run build-all

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


test-browser:
Expand All @@ -46,12 +52,20 @@ jobs:
with:
node-version: 12.x

- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

- run: npm ci
- run: npm run build-all
- run: npm run test-browser-${{ matrix.module }}
- name: Install node-hid requirements
run: sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev libudev-dev

- name: Install dependencies (and link per package)
run: npm ci

- name: Build CommonJS and ESM (from TypeScript)
run: npm run build-all

- name: Run tests
run: npm run test-browser-${{ matrix.module }}

test-react-native:

Expand All @@ -69,11 +83,17 @@ jobs:
with:
node-version: 12.x

- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

- name: Install dependencies (and link per package)
run: npm ci

- run: npm ci
- run: npm run build-all
- run: npm run test-react
- name: Build CommonJS and ESM (from TypeScript)
run: npm run build-all

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


coverage:
Expand All @@ -89,11 +109,20 @@ jobs:
with:
node-version: 12.x

- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

- name: Install node-hid requirements
run: sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev libudev-dev

- name: Install dependencies (and link per package)
run: npm ci

- name: Build CommonJS and ESM (from TypeScript)
run: npm run build-all

- run: npm ci
- run: npm run build-all
- run: npm run test-coverage
- name: Run tests
run: npm run test-coverage

- name: Upload coverage summary
uses: actions/upload-artifact@v2
Expand Down

0 comments on commit e8a9eea

Please sign in to comment.