Skip to content

Commit

Permalink
Merge pull request #46 from falsepopsky/dev
Browse files Browse the repository at this point in the history
ci: tests with node versions 18 and 20
  • Loading branch information
falsepopsky authored Oct 24, 2023
2 parents 5a90183 + feba148 commit b15bf4d
Show file tree
Hide file tree
Showing 8 changed files with 446 additions and 367 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: CD
on:
push:
branches:
- main

env:
PNPM_VERSION: 8.9.2

jobs:
lint:
name: ⬣ Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4.1.1

- name: Setup pnpm
uses: pnpm/action-setup@v2.4.0
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node
uses: actions/setup-node@v3.8.1
with:
node-version-file: ".nvmrc"
cache: pnpm

- name: Install dependencies
run: pnpm install
- name: Run lint
run: pnpm lint
test:
name: 🧪 Test
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4.1.1

- name: Setup pnpm
uses: pnpm/action-setup@v2.4.0
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node
uses: actions/setup-node@v3.8.1
with:
node-version-file: ".nvmrc"
cache: pnpm

- name: Install dependencies
run: pnpm install
- name: Run tests
run: pnpm test
build:
name: 🏗️ Build
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- name: Checkout repo
uses: actions/checkout@v4.1.1

- name: Setup pnpm
uses: pnpm/action-setup@v2.4.0
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node
uses: actions/setup-node@v3.8.1
with:
node-version-file: ".nvmrc"
cache: pnpm

- name: Install dependencies
run: pnpm install
- name: Run build
run: pnpm build
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
Expand Down Expand Up @@ -36,6 +33,9 @@ jobs:
test:
name: 🧪 Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["18.18.2", "20.9.0"]
steps:
- name: Checkout repo
uses: actions/checkout@v4.1.1
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3.8.1
with:
node-version-file: ".nvmrc"
node-version: ${{ matrix.node-version }}
cache: pnpm

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

on:
workflow_run:
workflows: ["CI"]
workflows: ["CD"]
types:
- completed
branches:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.18.2
v20.9.0
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build.environment]
NODE_VERSION = "18"
NODE_VERSION = "20.9.0"
[build]
publish = "docs/.vitepress/dist"
command = "pnpm docs:build"
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,29 @@
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@swc/core": "^1.3.94",
"@swc/core": "^1.3.95",
"@swc/jest": "^0.2.29",
"@types/jest": "^29.5.6",
"@types/node": "^20.8.7",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"@types/node": "^20.8.8",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"dotenv": "^16.3.1",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jest": "^27.4.3",
"eslint-plugin-n": "^16.2.0",
"eslint-plugin-promise": "^6.1.1",
"jest": "^29.7.0",
"msw": "^1.3.2",
"msw": "^2.0.0",
"prettier": "^3.0.3",
"tsx": "^3.14.0",
"typescript": "^5.2.2",
"vitepress": "1.0.0-rc.23"
"vitepress": "1.0.0-rc.24"
},
"engines": {
"node": ">=18",
"node": "^18.0.0 || ^20.0.0",
"pnpm": ">=8"
},
"repository": {
Expand Down
Loading

0 comments on commit b15bf4d

Please sign in to comment.