-
Notifications
You must be signed in to change notification settings - Fork 29
35 lines (33 loc) · 961 Bytes
/
tests.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
name: Npm tests
on:
push:
branches:
- main
pull_request:
branches:
- main
- "**/main"
jobs:
tests:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
# This actually doesn't work from a forked repo so ignoring for now
# with:
# ref: ${{ github.event.pull_request.head.ref }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18.x"
cache: "yarn"
- name: Install dependencies
run: yarn
- name: Run tests
run: yarn test
# This actually doesn't work from a forked repo so ignoring for now
# - name: Push yarn.lock update
# run: |
# git config --global user.email "[email protected]"
# git config --global user.name "flashlight-bot"
# git add yarn.lock && git diff --staged --quiet || git commit -m "chore: update yarn.lock"
# git push