Skip to content

Commit

Permalink
Clean up GitHub Actions workflow (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
bendrucker committed Mar 27, 2024
1 parent 6e1080a commit ed73d70
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 33 deletions.
50 changes: 18 additions & 32 deletions .github/workflows/ci.yml
@@ -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
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

0 comments on commit ed73d70

Please sign in to comment.