File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Pull Request
2+
3+ on :
4+ # Note that GITHUB_SHA for this event is the last merge commit of the pull
5+ # request merge branch. If you want to get the commit ID for the last commit
6+ # to the head branch of the pull request,
7+ # use github.event.pull_request.head.sha instead.
8+ # Docs: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
9+ pull_request :
10+ types : [opened, synchronize, reopened]
11+ branches :
12+ - ' v*'
13+
14+ jobs :
15+ build :
16+ runs-on : ubuntu-20.04
17+
18+ steps :
19+ - name : Clone repo
20+ uses : actions/checkout@v4
21+
22+ - name : Set .nvmrc content to stage output
23+ id : nvmrc
24+ run : |
25+ echo "node_version=$(cat .nvmrc | sed 's/v//g')" >> $GITHUB_OUTPUT
26+
27+ - name : Setup Node.js
28+ uses : actions/setup-node@v2
29+ with :
30+ node-version : ${{ steps.nvmrc.outputs.nvmrc }}
31+
32+ - name : Install dependencies
33+ run : npm ci
34+
35+ - name : Run tests
36+ run : npm run test
37+ env :
38+ GITHUB_TOKEN : ${{ secrets.GH_TKN }}
You can’t perform that action at this time.
0 commit comments