Skip to content

Commit b8bbd9d

Browse files
authored
Merge pull request #42 from per1234/test-workflow
Bring test workflow into compliance with best practices
2 parents 9edd380 + 0ede12f commit b8bbd9d

File tree

4 files changed

+40
-8
lines changed

4 files changed

+40
-8
lines changed

.github/workflows/check-npm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
# package.json schema is draft-04, which is not supported by ajv-cli >=4.
4242
run: sudo npm install --global ajv-cli@3.x
4343

44-
- name: Validate GitHub Actions workflows
44+
- name: Validate package.json
4545
run: |
4646
# See: https://github.com/ajv-validator/ajv-cli#readme
4747
ajv validate \

.github/workflows/setup-taskflile.yml renamed to .github/workflows/test-typescript-task.yml

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,56 @@
1-
name: setup-taskfile workflow
1+
name: Test TypeScript
22

33
on:
4-
pull_request:
54
push:
5+
paths:
6+
- ".github/workflows/test-typescript-task.yml"
7+
- "jest.config.js"
8+
- "package.json"
9+
- "package-lock.json"
10+
- "Taskfile.yml"
11+
- "tsconfig.json"
12+
- "__tests__/**"
13+
- "**.js"
14+
- "**.jsx"
15+
- "**.ts"
16+
- "**.tsx"
17+
pull_request:
18+
paths:
19+
- ".github/workflows/test-typescript-task.yml"
20+
- "jest.config.js"
21+
- "package.json"
22+
- "package-lock.json"
23+
- "Taskfile.yml"
24+
- "tsconfig.json"
25+
- "__tests__/**"
26+
- "**.js"
27+
- "**.jsx"
28+
- "**.ts"
29+
- "**.tsx"
30+
workflow_dispatch:
31+
repository_dispatch:
632

733
jobs:
834
test:
935
runs-on: ${{ matrix.operating-system }}
1036

1137
strategy:
38+
fail-fast: false
39+
1240
matrix:
13-
operating-system: [ubuntu-latest, windows-latest]
41+
operating-system:
42+
- macos-latest
43+
- ubuntu-latest
44+
- windows-latest
1445

1546
steps:
1647
- name: Checkout
17-
uses: actions/checkout@master
48+
uses: actions/checkout@v2
1849

1950
- name: Set Node.js 10.x
20-
uses: actions/setup-node@master
51+
uses: actions/setup-node@v2
2152
with:
22-
version: 10.x
53+
node-version: 12.x
2354

2455
- name: Install Task
2556
uses: arduino/actions/setup-taskfile@master

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# `arduino/setup-task`
22

3+
[![Test TypeScript status](https://github.com/arduino/setup-task/actions/workflows/test-typescript-task.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/test-typescript-task.yml)
34
[![Check TypeScript status](https://github.com/arduino/setup-task/actions/workflows/check-typescript-task.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/check-typescript-task.yml)
45
[![Check TypeScript Configuration status](https://github.com/arduino/setup-task/actions/workflows/check-tsconfig.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/check-tsconfig.yml)
56
[![Check npm status](https://github.com/arduino/setup-task/actions/workflows/check-npm.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/check-npm.yml)

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ tasks:
2020
- task: general:check-spelling
2121

2222
ts:install-deps:
23-
desc: Install TypeScript development dependencies
23+
desc: Install TypeScript dependencies
2424
cmds:
2525
- npm install
2626

0 commit comments

Comments
 (0)