Skip to content

Commit

Permalink
CI: Add test:packages stub.
Browse files Browse the repository at this point in the history
  • Loading branch information
filiphsps committed Oct 29, 2023
1 parent f451821 commit 4c1cd9a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 13 deletions.
22 changes: 16 additions & 6 deletions .github/common/install/action.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
name: "Install"
description: "Install dependencies"
name: 'Install'
description: 'Install dependencies'

runs:
using: "composite"
using: 'composite'
steps:
- name: 🏎️ Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: "https://registry.npmjs.org"
cache: "npm"
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'

- name: 📦 Install dependencies
shell: bash
run: npm ci

- name: 💾 Cache node modules
uses: actions/cache@v3
with:
path: |
~/.npm
${{ github.workspace }}/docs/.next/cache
key: ${{ runner.os }}-node-build-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.[jt]s', '**/*.[jt]sx') }}
restore-keys: |
${{ runner.os }}-node-build-${{ hashFiles('**/package-lock.json') }}-
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,19 @@ jobs:
- name: 📦 Install
uses: ./.github/common/install

- name: 🧪 Test
run: npm run test
# - name: 🧪 Test
# run: npm run test

typecheck:
name: ✅ Typecheck
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: 🕶️ Checkout repository
uses: actions/checkout@v4

- name: 📦 Install
uses: ./.github/common/install

- name: ✅ Typecheck
run: npm run typecheck
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@
},
"scripts": {
"prepare": "husky install",
"dev": "concurrently npm:dev:*",
"dev": "concurrently -i --raw npm:dev:*",
"dev:docs": "turbo dev --filter=@nordcom/nordstar-docs",
"dev:packages": "",
"build": "turbo build --filter=!@nordcom/nordstar-docs",
"build:docs": "turbo build --filter=@nordcom/nordstar-docs",
"typecheck": "turbo typecheck",
"lint": "concurrently npm:lint:*",
"lint:packages": "eslint -c .eslintrc.json ./packages/**/**/*.{ts,tsx}",
"lint": "concurrently --raw npm:lint:*",
"lint:docs": "eslint -c .eslintrc.json ./docs/**/*.{ts,tsx} --no-error-on-unmatched-pattern",
"test": "concurrently npm:test:*",
"clean": "concurrently npm:clean:*",
"lint:packages": "eslint -c .eslintrc.json ./packages/**/**/*.{ts,tsx}",
"test": "concurrently --raw npm:test:*",
"test:docs": "",
"test:packages": "",
"clean": "concurrently --raw npm:clean:*",
"clean:turbo": "turbo clean && rimraf ./node_modules/.cache/turbo",
"create:component": "plop component",
"create:package": "plop package",
Expand Down

0 comments on commit 4c1cd9a

Please sign in to comment.