Feat/data structures #22
This file contains hidden or 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
| name: Check PR | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| env: | |
| CI: true | |
| NODE_VERSION: 20 | |
| jobs: | |
| setup: | |
| name: 🏗️ Scaffold env | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 🏃♂️ Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: 🔨 Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| - name: 🧨 Setup Node ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'pnpm' | |
| - name: 💾 Cache dependencies | |
| uses: actions/cache@v4 | |
| id: cache | |
| with: | |
| path: | | |
| ~/.pnpm-store | |
| ./node_modules | |
| key: pnpm-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| pnpm-${{ runner.os }}- | |
| - name: 💥 Install deps | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: pnpm install | |
| lint: | |
| name: Lint 🔎 | |
| runs-on: ubuntu-latest | |
| needs: setup | |
| steps: | |
| - name: 🏃♂️ Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: 🔨 Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| - name: 🧨 Setup Node ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'pnpm' | |
| - name: 💾 Cache dependencies | |
| uses: actions/cache@v4 | |
| id: cache | |
| with: | |
| path: | | |
| ~/.pnpm-store | |
| ./node_modules | |
| key: pnpm-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| pnpm-${{ runner.os }}- | |
| - name: 💥 Init pnpm dependencies | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: pnpm install | |
| - name: 🔎 Lint codebase | |
| run: pnpm lint | |
| test: | |
| name: Test 🧪 | |
| runs-on: ubuntu-latest | |
| needs: setup | |
| steps: | |
| - name: 🏃♂️ Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: 🔨 Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| - name: 🧨 Setup Node ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'pnpm' | |
| - name: 💾 Cache dependencies | |
| uses: actions/cache@v4 | |
| id: cache | |
| with: | |
| path: | | |
| ~/.pnpm-store | |
| ./node_modules | |
| key: pnpm-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| pnpm-${{ runner.os }}- | |
| - name: 💥 Init pnpm dependencies | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: pnpm install | |
| - name: 🧪 Test codebase | |
| run: pnpm test | |
| compile: | |
| name: Compile ⚒️ | |
| runs-on: ubuntu-latest | |
| needs: setup | |
| steps: | |
| - name: 🏃♂️ Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: 🔨 Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| - name: 🧨 Setup Node ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'pnpm' | |
| - name: 💾 Cache dependencies | |
| uses: actions/cache@v4 | |
| id: cache | |
| with: | |
| path: | | |
| ~/.pnpm-store | |
| ./node_modules | |
| key: pnpm-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| pnpm-${{ runner.os }}- | |
| - name: 💥 Init pnpm dependencies | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: pnpm install | |
| - name: ⚒️ Compile | |
| run: pnpm build |