Skip to content

Commit 5b604d2

Browse files
ci: configure build matrix (#26)
* ci: configure build matrix * build: use execa
1 parent 522ecf5 commit 5b604d2

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ name: CI
33
on: [push, pull_request]
44

55
jobs:
6-
build:
7-
name: e2e tests
8-
9-
runs-on: ubuntu-latest
10-
6+
job:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
11+
node: ['12', '14', '15']
1112
steps:
1213
- uses: actions/checkout@v2
13-
- name: Use Node.js 12.x
14+
- name: Setup node
1415
uses: actions/setup-node@v1
1516
with:
16-
node-version: 12
17+
node-version: ${{ matrix.node }}
1718
- run: yarn install --frozen-lockfile
1819
- run: yarn test

gulpfile.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
const del = require('del');
2+
const execa = require('execa');
23
const gulp = require('gulp');
3-
const { spawn } = require('child_process');
44

55
gulp.task('clean', () => {
66
return del('./lib/*', { force: true });
77
});
88

9-
gulp.task('typescript', cb => {
10-
const cmd = spawn('tsc', { stdio: 'inherit' });
11-
cmd.on('close', code => {
12-
console.log(`The process exited with code ${code}`);
13-
cb(code);
14-
});
9+
gulp.task('typescript', async () => {
10+
const { exitCode } = await execa('tsc', { stdio: 'inherit' });
11+
console.log(`The process exited with code ${exitCode}`);
1512
});
1613

1714
gulp.task('copy', () => {

0 commit comments

Comments
 (0)