deps(deps): bump actions/checkout in the github-actions group Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4 to 5 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
72 lines
1.7 KiB
YAML
72 lines
1.7 KiB
YAML
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
|
|
name: Build, Lint, and Test Project
|
|
|
|
# Required permission on the caller workflow
|
|
# permissions:
|
|
# contents: read
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
node-version:
|
|
description: 'Node.js version'
|
|
required: true
|
|
default: 'lts/*'
|
|
type: string
|
|
|
|
jobs:
|
|
main:
|
|
name: Build, Lint, and Test Project
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: 📥 Checkout repository
|
|
uses: actions/checkout@v5
|
|
|
|
- name: 🔧 Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ inputs.node-version }}
|
|
|
|
- name: 🛠️ Setup Node.js Corepack
|
|
run: corepack enable
|
|
|
|
- name: 📦 Get Yarn Config
|
|
id: yarn_config
|
|
run: echo "cache_folder=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
|
|
|
- name: 🗄️ Cache Layer
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ steps.yarn_config.outputs.cache_folder }}
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-
|
|
|
|
- name: 🗂️ Cache .cache folders
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: packages/**/.cache
|
|
key: ${{ runner.os }}-cache
|
|
restore-keys: |
|
|
${{ runner.os }}-cache-
|
|
|
|
- name: 📥 Install Dependencies
|
|
run: yarn install --immutable
|
|
|
|
- name: 🏗️ Build
|
|
run: yarn build
|
|
env:
|
|
WIREIT_LOGGER: metrics
|
|
|
|
- name: 🧹 Run ESLint
|
|
run: yarn lint
|
|
env:
|
|
WIREIT_LOGGER: metrics
|
|
|
|
- name: 🧪 Run Tests
|
|
run: yarn test
|
|
env:
|
|
WIREIT_LOGGER: metrics
|