Skip to content
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

Clean up GitHub Actions workflow #153

Merged
merged 11 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 18 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: CI
name: ci

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

permissions:
contents: read
Expand All @@ -15,14 +19,13 @@ jobs:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
- run: yarn install # --frozen-lockfile TODO get this option working
- run: yarn lint
test-js:
node-version: 20
- run: npm install
- run: npm run lint

test:
timeout-minutes: 2
runs-on: ubuntu-latest
needs: lint
strategy:
fail-fast: false
matrix:
Expand All @@ -32,38 +35,21 @@ jobs:
- '16'
- '18'
- '20'
name: test js - node v${{ matrix.node }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: yarn
- run: yarn install # --frozen-lockfile TODO get this option working
- run: yarn test
test-ts:
- run: npm install
- run: npm test

types:
timeout-minutes: 2
runs-on: ubuntu-latest
needs: lint
strategy:
fail-fast: false
matrix:
node:
- '12'
- '14'
- '16'
- '18'
- '20'
name: test ts - node v${{ matrix.node }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: yarn
- run: yarn install # --frozen-lockfile TODO get this option working
- run: yarn test-ts
node-version: '20'
- run: npm install
- run: npm run test-ts
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"coverage": "nyc --reporter=html npm test && open-cli coverage/index.html",
"coverage-ci": "nyc --reporter=lcov npm test && codecov",
"lint": "standard",
"test": "tape test/*.js | tap-spec && npm run test-ts && npm run lint",
"test": "npm run test-js && npm run test-ts && npm run lint",
"test-js": "tape test/*.js | tap-spec",
"test-ts": "tsd"
},
"repository": {
Expand Down