Automate tests & release from GitHub Actions #63
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# | |
# Documentation: | |
# https://help.github.com/en/articles/workflow-syntax-for-github-actions | |
# | |
####################################### | |
# Start the job on all push to master # | |
####################################### | |
name: "Test" | |
on: | |
push: # Comment this line to trigger action only on pull-requests (not recommended if you don't pay for GH Actions) | |
pull_request: | |
branches: [master, main] | |
############### | |
# Set the Job # | |
############### | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Setup .npmrc file to publish to npm | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: "https://registry.npmjs.org" | |
# Defaults to the user or organization that owns the workflow file | |
scope: "nvuillam" | |
- name: Install dependencies and link | |
run: npm ci && npm link | |
- name: Run tests | |
run: npm run test |