Skip to content

Commit

Permalink
build npm action
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitasen-ubmainz committed Jun 12, 2023
1 parent 7489e4e commit 221a9e2
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
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.
45 changes: 45 additions & 0 deletions action.yml
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

0 comments on commit 221a9e2

Please sign in to comment.