Skip to content

Commit

Permalink
actions
Browse files Browse the repository at this point in the history
  • Loading branch information
vkruglikov committed Jan 2, 2025
1 parent 7e1ab56 commit 60dbad9
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/actions/install-npm-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Setup node_modules
description: Restores or reinstall the node_modules cache

runs:
using: "composite"
steps:
- name: Trying to pull node_modules
id: cache-node-modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-${{ github.repository }}-node-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies if cache is not found
if: steps.cache-node-modules.outputs.cache-hit != 'true'
shell: bash
run: npm ci --ignore-scripts
15 changes: 15 additions & 0 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Setup Node.js
runs:
using: "composite"
steps:
- name: Read Node.js version from .nvmrc
id: read-version
run: |
NODE_VERSION=$(cat .nvmrc | sed 's/^v//')
echo "node-version=$NODE_VERSION" >> $GITHUB_ENV
shell: bash

- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
16 changes: 16 additions & 0 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Build check

on:
push:

jobs:
install-deps:
name: Install dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node
- uses: ./.github/actions/install-npm-deps

- name: Build all packages
run: npm run build

0 comments on commit 60dbad9

Please sign in to comment.