Skip to content

Instantly share code, notes, and snippets.

@gbowne1
Created November 23, 2022 06:30
Show Gist options
  • Save gbowne1/4ee9d4ffb36878b65924eda8838cded4 to your computer and use it in GitHub Desktop.
Save gbowne1/4ee9d4ffb36878b65924eda8838cded4 to your computer and use it in GitHub Desktop.
name: Test
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
types:
- opened
- synchronize
- edited
- reopened
permissions:
contents: read
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
timeout-minutes: 10
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
node: [8.x, 10.x, 12.x, 14.x, 16.x, 18.x]
arch: [amd64, ppc64le]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: npm
node-version: 16
- run: npm ci
- run: npm test
- run: npm start & sleep 5 && npm test
jobs:
lint:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node: [18]
os: [ubuntu-20.04]
name: Lint
steps:
- uses: actions/checkout@v3 # v3
- name: Setup node
uses: actions/setup-node@v3 # v3.1.0
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm run lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment