Skip to content

Commit

Permalink
2 workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
enjikaka committed Jan 16, 2024
1 parent 72639dd commit 9d712d4
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 80 deletions.
18 changes: 18 additions & 0 deletions .github/actions/set-up.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Setup and cache
inputs:
node-version:
required: false
description: Node version for setup-node
default: 20.x

runs:
using: composite

steps:
- name: Set node version to ${{ inputs.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: 'npm'
- run: npm ci
name: Install dependencies
20 changes: 20 additions & 0 deletions .github/workflows/biome.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Vitest

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-and-cache
- name: Run Biome checks
run: npm biome
36 changes: 0 additions & 36 deletions .github/workflows/node.js.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/vitest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Vitest

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-and-cache
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Build project
run: npm run build --if-present
- name: Run tests
run: npm test
80 changes: 36 additions & 44 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,38 @@
{
"name": "@glatek/rutabaga",
"version": "0.0.1",
"description": "JSON Schema-backed CRUD operations in Service Workers with IndexedDB.",
"main": "index.js",
"type": "module",
"files": [
"dist"
],
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"test": "vitest",
"lint:fix": "npx @biomejs/biome check --apply ./src"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Glatek/rutabaga.git"
},
"keywords": [
"json",
"schema",
"crud",
"serivce",
"worker",
"indexeddb"
],
"author": "Jeremy Karlsson <jeremy@barlingshult.se>",
"license": "MIT",
"bugs": {
"url": "https://github.com/Glatek/rutabaga/issues"
},
"homepage": "https://github.com/Glatek/rutabaga#readme",
"devDependencies": {
"@biomejs/biome": "^1.5.0",
"@vitest/browser": "^1.2.0",
"ajv": "^8.12.0",
"ajv-formats": "^2.1.1",
"dexie": "^3.2.4",
"playwright": "^1.40.1",
"vite": "^5.0.11",
"vite-plugin-dts": "^3.7.1",
"vitest": "^1.2.0"
}
"name": "@glatek/rutabaga",
"version": "0.0.1",
"description": "JSON Schema-backed CRUD operations in Service Workers with IndexedDB.",
"main": "index.js",
"type": "module",
"files": ["dist"],
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"test": "vitest",
"biome": "npx @biomejs/biome",
"lint:fix": "npx @biomejs/biome check --apply ./src"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Glatek/rutabaga.git"
},
"keywords": ["json", "schema", "crud", "serivce", "worker", "indexeddb"],
"author": "Jeremy Karlsson <jeremy@barlingshult.se>",
"license": "MIT",
"bugs": {
"url": "https://github.com/Glatek/rutabaga/issues"
},
"homepage": "https://github.com/Glatek/rutabaga#readme",
"devDependencies": {
"@biomejs/biome": "^1.5.0",
"@vitest/browser": "^1.2.0",
"ajv": "^8.12.0",
"ajv-formats": "^2.1.1",
"dexie": "^3.2.4",
"playwright": "^1.40.1",
"vite": "^5.0.11",
"vite-plugin-dts": "^3.7.1",
"vitest": "^1.2.0"
}
}

0 comments on commit 9d712d4

Please sign in to comment.