Skip to content

Commit

Permalink
chore(ci): clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jkomyno committed Oct 14, 2024
1 parent 69ac8b8 commit d7e009a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 18 deletions.
30 changes: 18 additions & 12 deletions .github/actions/setup-node/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,32 @@ runs:
# Composite actions cannot use secrets, and are logged as a single step.
using: 'composite'
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}

- uses: pnpm/action-setup@v4
- name: '🔧 Install: pnpm'
uses: pnpm/action-setup@v4
with:
version: ${{ inputs.pnpm-version }}
run_install: false
standalone: true
dest: ~/setup-pnpm

- name: Cache pnpm modules
- name: 🔺️ Cache (turbo)
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ matrix.node }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.node }}-node-
${{ runner.os }}-turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
${{ runner.os }}-turbo-${{ github.job }}-${{ github.ref_name }}
${{ runner.os }}-turbo-${{ github.job }}
${{ runner.os }}-turbo
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: '💽️ Setup Node.js'
uses: actions/setup-node@v4
with:
cache-dependency-path: pnpm-lock.yaml
cache: 'pnpm'
node-version: ${{ inputs.node-version }}

- name: '📦️ Install Dependencies'
shell: bash
run: pnpm install --frozen-lockfile
19 changes: 13 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI workflow
name: ' ▶️ CI Workflow'

on:
push:
Expand All @@ -11,6 +11,10 @@ on:
- 'README.md'
workflow_dispatch:

concurrency:
group: pull-${{ github.ref }}-1
cancel-in-progress: true

env:
CI: "true"

Expand Down Expand Up @@ -38,17 +42,20 @@ jobs:
with:
fetch-depth: 0

- name: Setup (Node.js)
- name: '💽️ Setup (Node.js)'
uses: ./.github/actions/setup-node
with:
node-version: ${{ matrix.node }}
pnpm-version: ${{ matrix.pnpm }}

- name: Transpile TS to JS
run: pnpm build
- name: '🏗️ Build: Transpile TS to JS'
run: pnpm check:exports

- name: '🧪 Verify build'
run: pnpm check:exports

- name: Lint code
- name: '🚨️ Lint code'
run: pnpm lint:ci

- name: Run unit tests
- name: '🧳 Run unit tests'
run: pnpm test:unit

0 comments on commit d7e009a

Please sign in to comment.