-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (23 loc) · 928 Bytes
/
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
name: Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch. This prevents duplicated runs on internal PRs.
# Some discussion of this here:
# https://github.community/t/duplicate-checks-on-push-and-pull-request-simultaneous-event/18012
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- id: nvmrc
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
- name: Install Node.js 💻
uses: actions/setup-node@v4
with:
node-version: "${{ steps.nvmrc.outputs.NODE_VERSION }}"
- name: Install locked dependencies 🔧
run: npm clean-install
- name: Test 🧪
run: npm test