Skip to content

Workflow file for this run

# Install and cache deps, build project, run unit testing and integration testing
name: Workflow
on:
push:
branches: ["main"]
pull_request:
branches:
- main
- "feat/**"
- "fix/**"
- "chore/**"
- "release/**"
jobs:
complete:
name: Complete Workflow
strategy:
matrix:
node-version: [18]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ./
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# cache: "npm"
# cache-dependency-path: packages/mustard-cli/package.json
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: latest
run_install: false
# - name: Get pnpm store directory
# id: pnpm-cache
# shell: bash
# run: |
# echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
# - uses: actions/cache@v3
# name: Setup pnpm cache
# with:
# path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build project
run: pnpm --filter mustard-cli run build
- name: Run unit testing
run: pnpm --filter mustard-cli run test:unit
# - name: Run integration testing
# run: pnpm --filter mustard-cli run test:ig
- name: Run publint
run: pnpm --filter mustard-cli pub:check
- name: Coverage report
if: runner.os != 'Windows'
uses: codecov/codecov-action@v3
with:
directory: ./packages/mustard-cli/coverage
verbose: true