Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 20 additions & 30 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,48 @@ name: Test & Maybe Release
on: [push, pull_request]
jobs:
test:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node: [14, 16]
# windows support not quite ready: os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]

node: [16.x, 18.x, lts/*, current]
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Clone repository
- name: Checkout Repository
uses: actions/checkout@v3

- run: git fetch --prune --unshallow

- name: Set Node.js version
uses: actions/setup-node@v3
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ matrix.node }}

- run: node --version
- run: npm --version
- run: git --version

- name: Install npm dependencies
run: npm install

- name: Install Dependencies
run: |
npm install --no-progress
- name: Run tests
run: npm test

run: |
npm config set script-shell bash
npm run test:ci
release:
name: Release
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v3.6.0
with:
node-version: 14

node-version: lts/*
- name: Install dependencies
run: |
npm install --no-progress --no-package-lock --no-save

- name: Build
run: |
npm run build
- name: Install plugins
run: |
npm install \
Expand All @@ -65,9 +55,9 @@ jobs:
@semantic-release/git \
@semantic-release/changelog \
--no-progress --no-package-lock --no-save

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"scripts": {
"lint": "standard",
"format": "standard --fix",
"build": "true",
"test:ci": "npm run test",
"test": "npm run lint"
},
"author": "Rod <rod@vagg.org> (http://r.va.gg/)",
Expand Down