Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Merge pull request #42 from misaon/dependabot/npm_and_yarn/daisyui-4.… #107

Merge pull request #42 from misaon/dependabot/npm_and_yarn/daisyui-4.…

Merge pull request #42 from misaon/dependabot/npm_and_yarn/daisyui-4.… #107

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js version from .nvmrc
run: |
echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_ENV
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v2
name: 🔧 Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Cache pnpm store
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- uses: actions/cache@v3
name: Cache Cypress binary
with:
path: ~/.cache/Cypress
key: ${{ runner.os }}-cypress-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-cypress-
- name: 📦 Install dependencies
run: pnpm install
- name: 📝 Check formatting
run: pnpm run fmt
- name: 🔠 Lint project
run: pnpm run lint
- name: 💪 Test types
run: pnpm run typecheck
- name: 🛠 Build project
run: pnpm run build
- name: 🧪 Test project
run: pnpm run test
- name: 🎯 E2E test project
uses: cypress-io/github-action@v6
with:
start: pnpm run preview
browser: chrome
- name: 💾 Archive artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: cypress-artifacts
path: |
cypress/videos
cypress/screenshots
- name: 🟩 Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
fail_ci_if_error: true