mirror of
https://github.com/Snigdha-OS/documentation.git
synced 2025-12-07 04:53:50 +01:00
37 lines
796 B
YAML
37 lines
796 B
YAML
name: Reusable workflow
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
node-version:
|
|
required: true
|
|
type: string
|
|
#secrets:
|
|
#token:
|
|
#required: true
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node-version: ${{ fromJson(inputs.node-version) }}
|
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
registry-url: https://registry.npmjs.org/
|
|
cache: 'npm'
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
- name: Test
|
|
run: npm test
|