-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7489e4e
commit 221a9e2
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# build-npm-action | ||
# Composite action build-npm-action | ||
|
||
This action is a composite action that will collectively run all the steps of the `build-npm` and `build-npm-relase` workflow. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 | ||
|
||
- 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 | ||
|
||
- 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 }} | ||
|
||
- name: Run yarn install | ||
run: yarn install --ignore-scripts | ||
|
||
- name: Run yarn list | ||
run: yarn list --pattern @folio | ||
|
||
- name: Run yarn lint | ||
run: yarn lint | ||
continue-on-error: true | ||
|
||
- name: Run yarn test | ||
run: xvfb-run --server-args="-screen 0 1024x768x24" yarn test $YARN_TEST_OPTIONS | ||
|
||
- name: Run yarn formatjs-compile | ||
if: ${{ env.COMPILE_TRANSLATION_FILES == 'true' }} | ||
run: yarn formatjs-compile |