Skip to content

Commit 1be2458

Browse files
committedSep 2, 2024··
Simplify CI workflow, strip vestiges of Travis
1 parent 31d105b commit 1be2458

File tree

3 files changed

+20
-112
lines changed

3 files changed

+20
-112
lines changed
 

‎.github/workflows/ci.yml

+14-106
Original file line numberDiff line numberDiff line change
@@ -3,121 +3,29 @@ name: CI
33
on: [push, pull_request]
44

55
jobs:
6-
test-cli:
6+
test:
77
runs-on: ${{ matrix.os }}
8-
name: CLI Tests, node v${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }} with ${{ matrix.shell }}
8+
name: ${{ matrix.task }}, node v${{ matrix.node_version }} on ${{ matrix.os }}
99
strategy:
1010
matrix:
11+
task:
12+
- test-cli
13+
- test-api
1114
os:
12-
- ubuntu-latest
13-
- macos-latest
14-
- windows-latest
15+
- ubuntu-latest
16+
- macos-latest
17+
- windows-latest
18+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
1519
node_version:
16-
- 14
17-
- 16
18-
- 18
19-
architecture:
20-
- x64
21-
shell :
22-
- bash
23-
include:
24-
- os: windows-latest
25-
shell: cmd
26-
node_version: 14
27-
- os: windows-latest
28-
shell: powershell
29-
node_version: 14
30-
- os: windows-latest
31-
shell: pwsh
32-
node_version: 14
33-
- os: windows-latest
34-
shell: cmd
35-
node_version: 16
36-
- os: windows-latest
37-
shell: powershell
38-
node_version: 16
39-
- os: windows-latest
40-
shell: pwsh
41-
node_version: 16
42-
- os: windows-latest
43-
shell: cmd
44-
node_version: 18
45-
- os: windows-latest
46-
shell: powershell
47-
node_version: 18
48-
- os: windows-latest
49-
shell: pwsh
50-
node_version: 18
20+
- 16
21+
- 18
22+
- 20
23+
- 22
5124
steps:
52-
# https://github.com/actions/checkout#Push-a-commit-using-the-built-in-token
5325
- uses: actions/checkout@v3
54-
5526
- name: Use Node.js ${{ matrix.node_version }}
5627
uses: actions/setup-node@v3
5728
with:
5829
node-version: ${{ matrix.node_version }}
59-
60-
- name: Get npm cache directory
61-
id: npm-cache-dir
62-
shell: bash
63-
run: |
64-
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
65-
66-
- uses: actions/cache@v3
67-
with:
68-
path: ${{ steps.npm-cache-dir.outputs.dir }}
69-
key: 'node-v${{ matrix.node_version }}--arch-${{ matrix.architecture }}--${{ matrix.os }}--${{ matrix.shell }}--${{
70-
hashFiles(''**/package-lock.json'')
71-
}}'
72-
restore-keys: 'node-v${{ matrix.node_version }}--arch-${{ matrix.architecture }}--${{ matrix.os }}--${{ matrix.shell }}--'
73-
74-
- run: npm ci
75-
- run: corepack enable
76-
- run: npm run test-cli
77-
78-
79-
test-api:
80-
runs-on: ${{ matrix.os }}
81-
name: API tests, node v${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }}
82-
strategy:
83-
matrix:
84-
os:
85-
- ubuntu-latest
86-
- macos-latest
87-
- windows-latest
88-
node_version:
89-
- 14
90-
architecture:
91-
- x64
92-
include:
93-
- os: ubuntu-latest
94-
node_version: 16
95-
- os: ubuntu-latest
96-
node_version: 18
97-
98-
steps:
99-
# https://github.com/actions/checkout#Push-a-commit-using-the-built-in-token
100-
- uses: actions/checkout@v3
101-
102-
- name: Use Node.js v${{ matrix.node_version }}
103-
uses: actions/setup-node@v3
104-
with:
105-
node-version: ${{ matrix.node_version }}
106-
107-
- name: Get npm cache directory
108-
id: npm-cache-dir
109-
shell: bash
110-
run: |
111-
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
112-
113-
- uses: actions/cache@v3
114-
with:
115-
path: ${{ steps.npm-cache-dir.outputs.dir }}
116-
key: 'node-v${{ matrix.node_version }}--arch-${{ matrix.architecture }}--${{ matrix.os }}--default-shell--${{
117-
hashFiles(''**/package-lock.json'')
118-
}}'
119-
restore-keys: 'node-v${{ matrix.node_version }}--arch-${{ matrix.architecture }}--${{ matrix.os }}--default-shell--'
120-
12130
- run: npm ci
122-
- run: corepack enable
123-
- run: npm run test-api
31+
- run: npm run ${{ matrix.task }}

‎README v5 preview.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# ospec
22

3-
[![npm License](https://img.shields.io/npm/l/ospec.svg)](https://www.npmjs.com/package/ospec) [![npm Version](https://img.shields.io/npm/v/ospec.svg)](https://www.npmjs.com/package/ospec) [![Build Status](https://img.shields.io/travis/MithrilJS/ospec/master.svg)](https://travis-ci.org/MithrilJS/ospec) [![npm Downloads](https://img.shields.io/npm/dm/ospec.svg)](https://www.npmjs.com/package/ospec)
3+
[![npm License](https://img.shields.io/npm/l/ospec.svg)](https://www.npmjs.com/package/ospec) [![npm Version](https://img.shields.io/npm/v/ospec.svg)](https://www.npmjs.com/package/ospec) ![Build Status](https://img.shields.io/github/actions/workflow/status/MithrilJS/ospec/.github%2Fworkflows%2Fci.yml) [![npm Downloads](https://img.shields.io/npm/dm/ospec.svg)](https://www.npmjs.com/package/ospec)
44

5-
[![Donate at OpenCollective](https://img.shields.io/opencollective/all/mithriljs.svg?colorB=brightgreen)](https://opencollective.com/mithriljs) [![Gitter](https://img.shields.io/gitter/room/mithriljs/mithril.js.svg)](https://gitter.im/mithriljs/mithril.js)
5+
[![Donate at OpenCollective](https://img.shields.io/opencollective/all/mithriljs.svg?colorB=brightgreen)](https://opencollective.com/mithriljs) [![Zulip, join chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://mithril.zulipchat.com/)
66

77
---
88

@@ -742,7 +742,7 @@ While some testing libraries consider error thrown as assertions failure, `ospec
742742
- An error thrown in a task...
743743
- ...prevents further streaks and nested specs in the current spec from running. The `after` *hook* of the spec will run.
744744
- ...if thrown in a `beforeEach` hook of a streak, causes the streak to be hollowed out. Hooks defined in nested scopes and the actual test will not run. However, the `afterEach` hook corresponding to the one that crashed will run, as will those defined in outer scopes.
745-
745+
746746
For every error thrown, a "bail out" failure is reported.
747747

748748
---

‎README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# ospec
22

3-
[![npm License](https://img.shields.io/npm/l/ospec.svg)](https://www.npmjs.com/package/ospec) [![npm Version](https://img.shields.io/npm/v/ospec.svg)](https://www.npmjs.com/package/ospec) [![Build Status](https://img.shields.io/travis/MithrilJS/ospec/master.svg)](https://travis-ci.org/MithrilJS/ospec) [![npm Downloads](https://img.shields.io/npm/dm/ospec.svg)](https://www.npmjs.com/package/ospec)
3+
[![npm License](https://img.shields.io/npm/l/ospec.svg)](https://www.npmjs.com/package/ospec) [![npm Version](https://img.shields.io/npm/v/ospec.svg)](https://www.npmjs.com/package/ospec) ![Build Status](https://img.shields.io/github/actions/workflow/status/MithrilJS/ospec/.github%2Fworkflows%2Fci.yml) [![npm Downloads](https://img.shields.io/npm/dm/ospec.svg)](https://www.npmjs.com/package/ospec)
44

5-
[![Donate at OpenCollective](https://img.shields.io/opencollective/all/mithriljs.svg?colorB=brightgreen)](https://opencollective.com/mithriljs) [![Gitter](https://img.shields.io/gitter/room/mithriljs/mithril.js.svg)](https://gitter.im/mithriljs/mithril.js)
5+
[![Donate at OpenCollective](https://img.shields.io/opencollective/all/mithriljs.svg?colorB=brightgreen)](https://opencollective.com/mithriljs) [![Zulip, join chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://mithril.zulipchat.com/)
66

77
---
88

@@ -711,7 +711,7 @@ While some testing libraries consider error thrown as assertions failure, `ospec
711711
- An error thrown in a task...
712712
- ...prevents further streaks and nested specs in the current spec from running. The `after` *hook* of the spec will run.
713713
- ...if thrown in a `beforeEach` hook of a streak, causes the streak to be hollowed out. Hooks defined in nested scopes and the actual test will not run. However, the `afterEach` hook corresponding to the one that crashed will run, as will those defined in outer scopes.
714-
714+
715715
For every error thrown, a "bail out" failure is reported.
716716

717717
---

0 commit comments

Comments
 (0)
Please sign in to comment.