Skip to content

Commit

Permalink
Add types test
Browse files Browse the repository at this point in the history
  • Loading branch information
perry-mitchell committed Aug 2, 2024
1 parent c8ede23 commit c84691d
Showing 1 changed file with 53 additions and 39 deletions.
92 changes: 53 additions & 39 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,56 @@ on:
pull_request:

jobs:
nodejs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v2
- name: Node.js specs ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npm run test:node:esm
- run: npm run test:node:cjs
browser:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Browser specs ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npm run test:browser:cjs
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Formatting
uses: actions/setup-node@v1
with:
node-version: 18.x
- run: npm ci
- run: npm run test:format
nodejs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v2
- name: Node.js specs ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npm run test:node:esm
- run: npm run test:node:cjs
browser:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- name: Browser specs ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npm run test:browser:cjs
types:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- name: Type checks ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npx --yes @arethetypeswrong/cli@latest --pack .
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Formatting
uses: actions/setup-node@v1
with:
node-version: 20.x
- run: npm ci
- run: npm run test:format

1 comment on commit c84691d

@arjunyel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should replace node 16 with node 22 since 16 is no longer supported

Please sign in to comment.