Skip to content

Instantly share code, notes, and snippets.

@duncanlew
Created March 22, 2022 20:04
Definition for GitHub actions for running unit tests
name: Demo GitHub Actions
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test-job:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node 17.x
uses: actions/setup-node@v3
with:
node-version: '17.x'
- name: Install dependencies
run: npm ci
- name: Test
run: npm test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment