Skip to content

Fix/examples

Fix/examples #5

name: Generate Pull Request Stats Design Blocks
on:
pull_request:
types: [opened, synchronize]
env:
TURBO_VERSION: 1.11.2
PNPM_VERSION: 8.12.1
jobs:
format:
name: PR Stats
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
scope: "@design-blocks"
# We use week in the turbo cache key to keep the cache from infinitely growing
- id: get-week
run: echo name=WEEK::$(date +%U) >> $GITHUB_OUTPUT
- name: Turbo Cache
id: turbo-cache
uses: actions/cache@v3
with:
path: .turbo
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ steps.get-week.outputs.WEEK }}-${{ github.sha }}
restore-keys: |
turbo-${{ github.job }}-${{ github.ref_name }}-${{ steps.get-week.outputs.WEEK }}-
turbo-${{ github.job }}-canary-${{ steps.get-week.outputs.WEEK }}-
- name: Setup pnpm 🔥
run: |
corepack enable
corepack prepare pnpm@${PNPM_VERSION} --activate
- name: Install Dependencies 📦
run: |
pnpm install --no-frozen-lockfile
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: build 💣
run: pnpm turbo run build --cache-dir=".turbo"
- name: Tests 💩
run: pnpm test:coverage
- name: bundlesize
run: pnpm turbo run bundlesize --cache-dir=".turbo"
- name: lint 💅
run: pnpm turbo run lint --cache-dir=".turbo"