Skip to content

Commit ee440f1

Browse files
committed
Combine workflows & use absolute bin path
1 parent 5380880 commit ee440f1

File tree

3 files changed

+22
-40
lines changed

3 files changed

+22
-40
lines changed
Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
1-
name: Test
1+
name: CI
22

33
on:
44
push:
55
branches:
66
- main
7-
paths-ignore:
8-
- '**.md'
9-
- '**.ya?ml'
10-
- '!pnpm-lock.yaml'
11-
- '!.github/workflows/test.yml'
127
pull_request:
138
branches:
149
- main
15-
paths-ignore:
16-
- '**.md'
17-
- '**.ya?ml'
18-
- '!pnpm-lock.yaml'
19-
- '!.github/workflows/test.yml'
2010

2111
concurrency:
2212
group: ${{ github.workflow }}-${{ github.ref }}
2313
cancel-in-progress: true
2414

2515
jobs:
16+
lint:
17+
name: Lint
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v5
22+
23+
- name: Setup
24+
uses: ./.github/actions/setup
25+
26+
- name: Lint
27+
run: pnpm run lint
28+
29+
- name: Typecheck
30+
run: pnpm run typecheck
31+
2632
test:
2733
name: Node.js ${{ matrix.node }} on ${{ matrix.os.name }}
2834
runs-on: ${{ matrix.os.version }}
@@ -50,7 +56,7 @@ jobs:
5056
node-version: ${{ matrix.node }}
5157

5258
- name: Test
53-
run: pnpm test:all --coverage
59+
run: pnpm run test:all --coverage
5460

5561
- name: Submit coverage
5662
uses: coverallsapp/github-action@master

.github/workflows/lint-format.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

tests/e2e/index.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { spawn } from 'node:child_process';
2+
import path from 'node:path';
23
import readline from 'node:readline';
34

45
import { subscribeSpyTo } from '@hirez_io/observer-spy';
@@ -21,13 +22,15 @@ const createKillMessage = (prefix: string, signal: 'SIGTERM' | 'SIGINT' | string
2122
return new RegExp(escapeRegExp(prefix) + ' exited with code ' + (map[signal] ?? signal));
2223
};
2324

25+
const bin = path.resolve(import.meta.dirname, '../node_modules/.bin/concurrently');
26+
2427
/**
2528
* Creates a child process running 'concurrently' with the given args.
2629
* Returns observables for its combined stdout + stderr output, close events, pid, and stdin stream.
2730
*/
2831
const run = (args: string, ctrlcWrapper?: boolean) => {
2932
const spawnFn = ctrlcWrapper ? spawnWithWrapper : spawn;
30-
const child = spawnFn('../node_modules/.bin/concurrently', stringArgv(args), {
33+
const child = spawnFn(bin, stringArgv(args), {
3134
cwd: __dirname,
3235
env: {
3336
...process.env,

0 commit comments

Comments
 (0)