Skip to content

Test Dependencies Setup #3

Test Dependencies Setup

Test Dependencies Setup #3

Workflow file for this run

name: Test Dependencies Setup
on:
workflow_dispatch:
env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store
jobs:
setup_dependencies:
name: 'Setup and Test Dependencies'
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout code repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: 9.1.2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- name: Setup PNPM Store Config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: Install Dependencies
run: |
if [ ! -f pnpm-lock.yaml ]; then
echo "Lockfile not found. Generating new lockfile."
pnpm install
else
echo "Lockfile found. Installing dependencies with frozen lockfile."
pnpm install --frozen-lockfile
fi
- name: Setup npmrc File for Private Registry
run: |
echo "@mycompany:registry=https://npm.pkg.github.com" >> "$HOME/.npmrc"
echo "//npm.pkg.github.com/:_authToken=${{ secrets.NPM_PUBLISH_TOKEN }}" >> "$HOME/.npmrc"
echo "//registry.npmjs.org/:_authToken=null" >> "$HOME/.npmrc"
- name: Debugging Step
run: |
echo "Current Directory:"
pwd
echo "PNPM Cache Directory:"
ls -al $PNPM_CACHE_FOLDER
echo "NPMRC File:"
cat "$HOME/.npmrc"
- name: Test Dependencies
run: pnpm test # Replace with your actual test command if needed