Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Folio 3775 - Use composite actions in CI workflow #2488

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 2 additions & 40 deletions .github/workflows/build-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,46 +37,8 @@ jobs:
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 --frozen-lockfile

- name: Run yarn list
run: yarn list --pattern @folio

- name: Run yarn lint
run: yarn lint
continue-on-error: true

- name: Get number of CPU cores
id: cpu-cores
uses: SimenB/github-actions-cpu-cores@v1

- name: Run yarn test
run: xvfb-run --server-args="-screen 0 1024x768x24" yarn test $YARN_TEST_OPTIONS --max-workers ${{ steps.cpu-cores.outputs.count }}

- name: Run yarn formatjs-compile
if : ${{ env.COMPILE_TRANSLATION_FILES == 'true' }}
run: yarn formatjs-compile
- name: Use composite action for yarn based steps
uses: ankitasen-ubmainz/[email protected]

- name: Generate Module descriptor
if: ${{ env.PUBLISH_MOD_DESCRIPTOR == 'true' }}
Expand Down