Skip to content

Commit

Permalink
ci: switch to pnpm (kamp-us#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanueste committed Jul 24, 2023
1 parent d63c9ee commit 502064b
Show file tree
Hide file tree
Showing 12 changed files with 17,885 additions and 24,811 deletions.
33 changes: 26 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: ["main", "dev"]
branches: ["main", "dev", "ci-npm"]
pull_request:
types: [opened, synchronize]

Expand All @@ -20,28 +20,47 @@ jobs:
name: Build and Test
timeout-minutes: 15
runs-on: ubuntu-latest

# To use Remote Caching, uncomment the next lines and follow the steps below.
# env:
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
# TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
# TURBO_REMOTE_ONLY: true

steps:
- name: Check out code
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Setup Node.js environment
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: "package.json"

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: npm install
run: pnpm install

- name: Build
run: npm run build
run: pnpm run build

# - name: Test
# run: npm run test
23 changes: 23 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Disable `workspace:*` syntax for defining workspace package dependencies.
#
# See: https://pnpm.io/npmrc#save-workspace-protocol
save-workspace-protocol=false

# Link locally available packages to `node_modules` instead of downloading
# from registry.
#
# See: https://pnpm.io/npmrc#link-workspace-packages
link-workspace-packages=true

# Prefer workspace packages over packages on the registry even if there is
# a newer version of the workspace package is available on registry.
#
# Note: Only useful if `save-workspace-protocol=false`, otherwise
# `workspace:*` syntax will handle this case anyway.
#
# See: https://pnpm.io/npmrc#prefer-workspace-packages
prefer-workspace-packages=true

# hoist=false
public-hoist-pattern[]=*ui-next*
# node-linker=hoisted
6 changes: 5 additions & 1 deletion apps/gql/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { withContentlayer } from "next-contentlayer";

/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
swcMinify: true,
transpilePackages: ["@kampus/sozluk-content"],
};

export default config;
export default withContentlayer(nextConfig);
1 change: 1 addition & 0 deletions apps/gql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"graphql-config": "4.5.0",
"graphql-scalars": "1.21.3",
"graphql-yoga": "3.9.1",
"next-contentlayer": "^0.3.4",
"object-hash": "3.0.0",
"znv": "0.3.2",
"zod": "3.21.4"
Expand Down
4 changes: 4 additions & 0 deletions apps/ui/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

2 changes: 2 additions & 0 deletions apps/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"extends": "../../package.json"
},
"devDependencies": {
"@kampus/kampus": "*",
"@kampus/tailwind": "*",
"@kampus/ui-next": "*",
"@storybook/addon-a11y": "^7.0.20",
"@storybook/addon-essentials": "^7.0.20",
"@storybook/addon-interactions": "^7.0.20",
Expand Down
Loading

0 comments on commit 502064b

Please sign in to comment.