Skip to content

Add Codespaces to feature list #98

Add Codespaces to feature list

Add Codespaces to feature list #98

Workflow file for this run

---
name: Check
on:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
test:
name: Test (Node.js v${{ matrix.node }} on ${{ matrix.os_name }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node:
- '18'
- '20'
include:
- os: ubuntu-latest
os_name: Linux
- os: macos-latest
os_name: macOS
- os: windows-latest
os_name: Windows
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node_version: ${{ matrix.node }}
- name: Test
run: npm test
lint:
name: Lint (Node.js v${{ matrix.node }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
node:
- '18'
- '20'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node_version: ${{ matrix.node }}
- name: Lint
run: npm run lint
build:
name: Build
uses: ./.github/workflows/_build.yml
install:
name: Install (Node.js v${{ matrix.node }} on ${{ matrix.os_name }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
needs: build
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node:
- '18'
- '20'
include:
- os: ubuntu-latest
os_name: Linux
- os: macos-latest
os_name: macOS
- os: windows-latest
os_name: Windows
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ needs.build.outputs.artifact_name }}
path: .
- name: Find packages
uses: tj-actions/glob@v21
id: packages
with:
files: '*.tgz'
- name: Create package.json
uses: DamianReeves/[email protected]
with:
write-mode: overwrite
path: package.json
contents: |
{"type":"module"}
- name: Create index.js
uses: DamianReeves/[email protected]
with:
write-mode: overwrite
path: index.js
contents: |
import '@makenew/tsmodule'
- name: Install
run: npm install --save ${{ steps.packages.outputs.paths }}
- name: Run
run: node index.js
typecheck:
name: Typecheck (Node.js v${{ matrix.node }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
node:
- '18'
- '20'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node_version: ${{ matrix.node }}
- name: Typecheck
run: npm run typecheck