Skip to content

Commit

Permalink
Merge pull request #61 from marc0l92/develop
Browse files Browse the repository at this point in the history
Setup CI and unit tests
  • Loading branch information
marc0l92 authored Jan 17, 2023
2 parents d6d61ee + 60bba3a commit 50ab5d9
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Node.js CI

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

jobs:
build:
Expand All @@ -31,9 +31,9 @@ jobs:
- name: Build
id: build
run: |
pnpm run build --if-present
pnpm run build
- name: Test
id: test
run: |
pnpm run test --if-present
pnpm run test
2 changes: 1 addition & 1 deletion .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
id: build
run: |
pnpm install --frozen-lockfile
pnpm run build --if-present
pnpm run build
mkdir ${{ env.PLUGIN_NAME }}
cp main.js manifest.json styles.css ${{ env.PLUGIN_NAME }}
zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }}
Expand Down
6 changes: 0 additions & 6 deletions docs-gen/docs/changelog/changelog.md

This file was deleted.

2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-jira-issue",
"name": "Jira Issue",
"version": "1.50.5",
"version": "1.51.0",
"minAppVersion": "0.12.0",
"description": "This plugin allows you to track the progress of Atlassian Jira issues from your Obsidian notes.",
"author": "marc0l92",
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "obsidian-jira-issue",
"version": "1.50.5",
"version": "1.51.0",
"description": "This plugin allows you to track the progress of [Atlassian Jira](https://www.atlassian.com/software/jira) issues from your [Obsidian](https://obsidian.md/) notes.",
"main": "src/main.js",
"scripts": {
"dev": "node esbuild.config.mjs",
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
"version": "node version-bump.mjs && git add manifest.json versions.json package.json",
"test": "jest",
"test-watch": "jest --watchAll"
"test": "cross-env-shell TZ=UTC jest",
"test-watch": "cross-env-shell TZ=UTC \"jest --watchAll\""
},
"keywords": [
"obsidian",
Expand All @@ -31,6 +31,7 @@
"obsidian": "latest",
"ts-jest": "^29.0.3",
"tslib": "2.4.1",
"cross-env": "^7.0.3",
"typescript": "4.9.4"
},
"dependencies": {
Expand All @@ -45,4 +46,4 @@
"moment": "^2.29.3",
"ms": "^2.1.3"
}
}
}
10 changes: 10 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions test/objectsCache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const kKey1 = 'key1'
const kKey2 = 'key2'
const kVal1 = 'val1'
const kVal2 = 'val2'
const kFakeDateNow = new Date('2000-01-01')
const kFakeDateAfterExpiration = new Date('2000-01-02')
const kFakeDateNow = new Date(Date.UTC(2000, 0, 1))
const kFakeDateAfterExpiration = new Date(Date.UTC(2000, 0, 2))

describe('ObjectsCache', () => {
beforeEach(() => {
Expand Down Expand Up @@ -67,7 +67,7 @@ describe('ObjectsCache', () => {
test('Item getTime', () => {
expect(ObjectsCache.getTime(kKey1)).toBeNull()
ObjectsCache.add(kKey1, kVal1)
expect(ObjectsCache.getTime(kKey1)).toEqual('Sat, Jan 1, 2000 1:00 AM')
expect(ObjectsCache.getTime(kKey1)).toEqual('Sat, Jan 1, 2000 12:00 AM')
})

test('Item get item after expiration', () => {
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@
"1.50.2": "0.12.0",
"1.50.3": "0.12.0",
"1.50.4": "0.12.0",
"1.50.5": "0.12.0"
"1.50.5": "0.12.0",
"1.51.0": "0.12.0"
}

0 comments on commit 50ab5d9

Please sign in to comment.