-
Notifications
You must be signed in to change notification settings - Fork 45
38 lines (36 loc) · 1.22 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
#
# 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
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && !contains(github.event.head_commit.message, 'skip deploy')
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: "https://registry.npmjs.org"
# Defaults to the user or organization that owns the workflow file
scope: "nvuillam"
- run: yarn
- run: yarn prepack
- run: yarn test
# - name: Submitting code coverage to codecov
# run: |
# ./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov
# curl -s https://codecov.io/bash | bash