ci: adjustments to gpm
release pipeline
#9
This file contains 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: 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: bun-cache | |
with: | |
path: "**/node_modules" | |
key: ${{ runner.os }}-node-${{ hashFiles('**/bun.lockb') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
if: steps.bun-cache.outputs.cache-hit != 'true' | |
- 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.bun-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.bun-cache.outputs.cache-hit != 'true' | |
run: bun install --frozen-lockfile | |
- name: 🏗️ Build package | |
run: bun run build |