Merge pull request #164 from savindi7/add-icons #136
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will run the tests on the main branch. | |
name: π³ Test Runner | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
test: | |
name: πΎ Unit Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ lts/* ] | |
steps: | |
- name: β¬οΈ Checkout | |
id: checkout | |
uses: actions/checkout@v2.3.3 | |
with: | |
fetch-depth: 0 | |
- name: π’ Setup node | |
id: setup-node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: π₯‘ Setup pnpm | |
uses: pnpm/action-setup@v2.1.0 | |
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: π Run Unit Tests | |
id: run-tests | |
run: pnpm test |