Skip to content

Bring test workflow into compliance with best practices #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 10, 2021
Merged
2 changes: 1 addition & 1 deletion .github/workflows/check-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
# package.json schema is draft-04, which is not supported by ajv-cli >=4.
run: sudo npm install --global ajv-cli@3.x

- name: Validate GitHub Actions workflows
- name: Validate package.json
run: |
# See: https://github.com/ajv-validator/ajv-cli#readme
ajv validate \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,56 @@
name: setup-taskfile workflow
name: Test TypeScript

on:
pull_request:
push:
paths:
- ".github/workflows/test-typescript-task.yml"
- "jest.config.js"
- "package.json"
- "package-lock.json"
- "Taskfile.yml"
- "tsconfig.json"
- "__tests__/**"
- "**.js"
- "**.jsx"
- "**.ts"
- "**.tsx"
pull_request:
paths:
- ".github/workflows/test-typescript-task.yml"
- "jest.config.js"
- "package.json"
- "package-lock.json"
- "Taskfile.yml"
- "tsconfig.json"
- "__tests__/**"
- "**.js"
- "**.jsx"
- "**.ts"
- "**.tsx"
workflow_dispatch:
repository_dispatch:

jobs:
test:
runs-on: ${{ matrix.operating-system }}

strategy:
fail-fast: false

matrix:
operating-system: [ubuntu-latest, windows-latest]
operating-system:
- macos-latest
- ubuntu-latest
- windows-latest

steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v2

- name: Set Node.js 10.x
uses: actions/setup-node@master
uses: actions/setup-node@v2
with:
version: 10.x
node-version: 12.x

- name: Install Task
uses: arduino/actions/setup-taskfile@master
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# `arduino/setup-task`

[![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)
[![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)
[![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)
[![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)
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tasks:
- task: general:check-spelling

ts:install-deps:
desc: Install TypeScript development dependencies
desc: Install TypeScript dependencies
cmds:
- npm install

Expand Down