Skip to content

Merge pull request #1 from brionmario/main #1

Merge pull request #1 from brionmario/main

Merge pull request #1 from brionmario/main #1

Workflow file for this run

# This workflow will run tests on the main branch once a PR is merged.
name: 🧪 Test
on:
push:
branches:
- main
workflow_dispatch:
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
jobs:
build:
name: 👩🏻‍🔬 Test
if: ${{ github.ref == 'refs/heads/main' }}
strategy:
matrix:
node-version: [ lts/* ]
# Try to check for build compatibility on common platforms.
os: [ ubuntu-latest, macOS-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: ⬇️ Checkout
id: checkout
uses: actions/[email protected]
- name: 🟢 Setup node
id: setup-node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: 🥡 Setup pnpm
id: setup-pnpm
uses: pnpm/[email protected]
with:
version: latest
run_install: false
- name: 🎈 Get pnpm store directory
id: get-pnpm-cache-dir
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: 🔆 Cache pnpm modules
uses: actions/cache@v3
id: pnpm-cache
with:
path: ${{ steps.get-pnpm-cache-dir.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: 🧩 Install Dependencies
id: install-dependencies
run: pnpm install
- name: 🏗️ Build
id: build
run: pnpm build
- name: 🧪 Test
id: test
run: pnpm test