forked from sleepdiary/core
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.14 KB
/
pull_request.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
39
40
# Run tests when a pull request is received
#
# Note: As of 2021-08-04, GitHub Actions has no good way to reply to PRs.
# Here are some links that might help:
# * https://gh.neting.ccmunity/t/github-actions-are-severely-limited-on-prs/18179#M9249
# * people complaining about this issue, some have interesting workarounds
# * https://github.com/mshick/add-pr-comment
# * one (partial) solution
name: Check incoming PRs
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: built
- name: Run tests
id: run_tests
uses: docker://ghcr.io/sleepdiary/builder:latest
with:
args: automated-test