This repository was archived by the owner on Jun 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (57 loc) · 1.79 KB
/
test.yml
File metadata and controls
65 lines (57 loc) · 1.79 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: test
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: check out latest commit
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref }}
token: ${{ secrets.GH_TOKEN }}
- name: cache node_modules
uses: actions/cache@v4
id: cache-node-modules
with:
path: node_modules/
key: reactui-modules-${{ hashFiles('yarn.lock') }}
- name: get node version
id: node-version
run: echo "::set-output name=value::$( cat .node-version )"
- name: set up node
uses: actions/setup-node@v4
with:
node-version: ${{ steps.node-version.outputs.value }}
registry-url: https://npm.pkg.github.com
scope: '@rentpath'
- name: get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: cache dependencies
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: install dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.GPR_PUBLIC_TOKEN }}
run: |
yarn config set @rentpath:registry https://npm.pkg.github.com
yarn --frozen-lockfile --production=false
- name: unit tests
run: |
yarn run test --maxWorkers=2
# enable as soon as coveralls is working
# or move to its own job?
# - name: test code coverage
# run: |
# yarn run report-coverage