Skip to content

ci: remove cache from initial dependency install #36

ci: remove cache from initial dependency install

ci: remove cache from initial dependency install #36

Workflow file for this run

name: tests
on:
push:
branches:
- main
jobs:
install-deps:
runs-on: ubuntu-latest
name: 📦 Install dependencies
steps:
- name: 🔑 Checkout Repository
uses: actions/checkout@v4
- name: 🔧 Install Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: ♻️ Cache node_modules
uses: actions/cache@v4
id: cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/bun.lockb') }}
- run: bun install --frozen-lockfile
tests:
name: 🧪 Test package
runs-on: ubuntu-latest
needs: install-deps
steps:
- name: 🔑 Checkout Repository
uses: actions/checkout@v4
- name: 🔧 Install Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: ♻️ Load node_modules
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/bun.lockb') }}
- name: 📦 Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile
- name: 🧪 Run tests
run: bun run test:ci
- name: ⬆️ Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
build:
name: 🏗️ Build package
runs-on: ubuntu-latest
needs: install-deps
steps:
- name: 🔑 Checkout Repository
uses: actions/checkout@v4
- name: 🔧 Install Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: ♻️ Load node_modules
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/bun.lockb') }}
- name: 📦 Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile
- name: 🏗️ Build package
run: bun run build