Skip to content

Private changes, not for merging #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ name: JS - Unit Tests
on: push

jobs:

run-tests:
name: Unit Tests
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
cache: yarn

- name: Install dependencies with caching
uses: bahmutov/npm-install@v1
- name: Install dependencies
run: yarn --frozen-lockfile

- name: Check types
run: |
Expand All @@ -27,3 +27,9 @@ jobs:
- name: Run unit tests
run: |
yarn run test

- name: Run integrated tests
uses: ./
with:
should_push: false
artifact_name: "diagram.svg"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
.vscode/settings.json
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
. "$(dirname "$0")/_/husky.sh"

npm run build
git add index.js
git add index.cjs
10 changes: 7 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ inputs:
branch:
description: "The branch name to push the diagram to (branch will be created if it does not yet exist). For example: diagram"
required: false
amend_commit:
description: "Whether to amend the last commit with the new diagram. Must be true or false. Default: false"
required: false
default: "false"
should_push:
description: "Whether to push the new commit back to the repository. Must be true or false. Default: true"
required: false
default: true
default: "true"
artifact_name:
description: "If given, the name of an artifact to be created containing the diagram. Default: don't create an artifact."
required: false
Expand All @@ -39,8 +43,8 @@ outputs:
svg:
description: "The diagram contents as text"
runs:
using: "node16"
main: "index.js"
using: "node20"
main: "index.cjs"
branding:
color: "purple"
icon: "target"
31 changes: 31 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"ignore": ["index.cjs"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
}
}
469 changes: 469 additions & 0 deletions index.cjs

Large diffs are not rendered by default.

Loading