-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
45 lines (45 loc) · 1.51 KB
/
action.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
41
42
43
44
45
name: "build-npm-action"
description: "install node dependencies, build the source code,run unit tests, publish NPM artifacts"
runs:
using: "composite"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup kernel for react native, increase watchers
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
shell: bash
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODEJS_VERSION }}
check-latest: true
always-auth: true
- name: Set yarn config
run: yarn config set @folio:registry $FOLIO_NPM_REGISTRY
shell: bash
- name: Set FOLIO NPM snapshot version
run: |
git clone https://github.com/folio-org/folio-tools.git
npm --no-git-tag-version version `folio-tools/github-actions-scripts/folioci_npmver.sh`
rm -rf folio-tools
env:
JOB_ID: ${{ github.run_number }}
shell: bash
- name: Run yarn install
run: yarn install --ignore-scripts
shell: bash
- name: Run yarn list
run: yarn list --pattern @folio
shell: bash
- name: Run yarn lint
run: yarn lint
continue-on-error: true
shell: bash
- name: Run yarn test
run: xvfb-run --server-args="-screen 0 1024x768x24" yarn test $YARN_TEST_OPTIONS
shell: bash
- name: Run yarn formatjs-compile
if: ${{ env.COMPILE_TRANSLATION_FILES == 'true' }}
run: yarn formatjs-compile
shell: bash