Compare commits

..

5 Commits

Author SHA1 Message Date
semantic-release-bot
3b85dc80a0 chore(release): 1.0.2 [skip ci]
## [1.0.2](https://github.com/qlik-oss/network-vis-chart/compare/v1.0.1...v1.0.2) (2023-08-17)

### Bug Fixes

* remove prepublish ([d7c754c](d7c754cb3e))
2023-08-17 08:20:18 +00:00
caele
d7c754cb3e fix: remove prepublish 2023-08-17 10:17:56 +02:00
semantic-release-bot
4edb698dc0 chore(release): 1.0.1 [skip ci]
## [1.0.1](https://github.com/qlik-oss/network-vis-chart/compare/v1.0.0...v1.0.1) (2023-08-16)

### Bug Fixes

* trigger patch change ([e1152aa](e1152aa0d9))
2023-08-16 14:12:18 +00:00
caele
e1152aa0d9 fix: trigger patch change 2023-08-16 16:00:55 +02:00
Tobias Åström
8b827b0848 chore: go gh (#48)
* chore: go gh

* chore: remove circle
2023-08-16 13:02:33 +02:00
6 changed files with 61 additions and 203 deletions

View File

@@ -1,199 +0,0 @@
version: 2
defaults: &defaults
working_directory: ~/project
docker:
- image: cimg/node:lts
aliases:
- &restore_yarn_cache
name: Restore yarn cache
keys:
- yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-packages-{{ .Branch }}
- yarn-packages-
- &save_yarn_cache
name: Save yarn cache
paths:
- ~/.cache/yarn
key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
jobs:
install:
<<: *defaults
steps:
- checkout
- restore_cache: *restore_yarn_cache
- run: yarn install --frozen-lockfile
- save_cache: *save_yarn_cache
- store_artifacts:
path: package.json
- persist_to_workspace:
root: ~/project
paths:
- .
build:
<<: *defaults
steps:
- attach_workspace:
at: ~/project
- run:
name: Build
command: yarn run build
- run:
name: Build sense
command: yarn run sense
- persist_to_workspace:
root: ~/project
paths:
- .
lint:
<<: *defaults
steps:
- attach_workspace:
at: ~/project
- run:
name: Lint
command: yarn run eslint
unit-tests:
<<: *defaults
steps:
- attach_workspace:
at: ~/project
- run:
name: Run unit tests and publish to codeclimate
command: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
yarn test:unit --runInBand --coverage --reporters=default --reporters=jest-junit
./cc-test-reporter after-build --coverage-input-type lcov --exit-code $?
environment:
JEST_JUNIT_OUTPUT_DIR: ./coverage/junit/
- store_artifacts:
path: coverage
api-spec:
<<: *defaults
steps:
- attach_workspace:
at: ~/project
- run:
name: Build API specification
command: yarn run spec
publish-dev:
<<: *defaults
steps:
- attach_workspace:
at: ~/project
- run: zip -r "sn-network-chart-ext.zip" "./sn-network-chart-ext"
- store_artifacts:
path: ./sn-network-chart-ext.zip
publish:
<<: *defaults
steps:
- attach_workspace:
at: ~/project
- run:
name: Setup npm
command: |
set -eo pipefail
# Amend auth token for access to public npm registry for @nebula.js packages
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run:
name: Publish
command: |
set -euo pipefail
PROJ_VER=v$(cat package.json | jq -r '.version')
TAG_NAME=$(git tag --points-at HEAD)
if [ "$TAG_NAME" == "$PROJ_VER" ]
then
echo "Running >> npm publish"
npm publish
fi
api-governance:
machine:
image: ubuntu-2004:current
working_directory: ~/project
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: Create version.txt
command: |
set -x
if [ -n "${CIRCLE_TAG}" ]; then
version=${CIRCLE_TAG#v}
else
version=$(git describe --tags --abbrev=7 --match "v*")
version=${version#v}
fi
echo "$version" > ./version.txt
echo "Building $version"
- run:
name: Prepare API Compliance
command: |
docker pull ghcr.io/qlik-download/api-compliance
docker create -v /specs --name specs alpine:3.4 /bin/true
docker cp ./api-specifications/properties.json specs:/specs
- run:
name: Run API Compliance
command: >
VER=$(cat ./version.txt)
docker run --volumes-from specs
-e SPEC_PATHS="e3863ba0-a48d-4034-8a77-1b00ce8a637d@/specs/properties.json"
-e COMMIT_SHA="$CIRCLE_SHA1"
-e RELEASE_TAG="$VER"
-e CREDENTIALS_S3_SECRETKEY="$APICULTURIST_S3"
-e CREDENTIALS_GITHUB="$APICULTURIST_GITHUB"
-e CREDENTIALS_COLONY="$APICULTURIST_TOKEN"
ghcr.io/qlik-download/api-compliance
workflows:
version: 2
build-all:
jobs:
- install
- build:
requires:
- install
- unit-tests:
requires:
- build
- lint:
requires:
- build
- api-spec:
requires:
- install
- publish-dev:
requires:
- build
- publish:
requires:
- build
- unit-tests
- lint
- api-spec
filters:
branches:
only:
- main
- api-governance:
context: api-compliance
filters:
branches:
# Forked pull requests have CIRCLE_BRANCH set to pull/XXX
ignore:
- /pull\/[0-9]+/
- renovate/minor-and-patch
tags:
only:
- /v.*/

19
.codeclimate.yml Normal file
View File

@@ -0,0 +1,19 @@
version: "2"
checks:
method-lines:
config:
threshold: 100
method-complexity:
config:
threshold: 10
similar-code:
config:
threshold: 65
identical-code:
config:
threshold: 65
exclude_patterns:
- "src/**/*.test.ts"
- "src/**/*.test.tsx"
- "*config*"
- "test/**/__fixtures__"

22
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: Build
on:
workflow_dispatch:
inputs:
release:
type: boolean
required: true
default: false
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
uses: qlik-oss/sn-gh-workflows/.github/workflows/build.yaml@v1
secrets: inherit
with:
release: ${{ inputs.release || false}}
api_specification_path: api-specifications/properties.json

17
.github/workflows/semantic.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: "Semantic PR"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -3,7 +3,7 @@
"info": {
"name": "@nebula.js/sn-network-chart:properties",
"description": "Network chart generic object definition",
"version": "1.0.0",
"version": "1.0.2",
"license": "MIT",
"stability": "experimental",
"x-qlik-visibility": "public"

View File

@@ -1,6 +1,6 @@
{
"name": "@nebula.js/sn-network-chart",
"version": "1.0.0",
"version": "1.0.2",
"description": "Displays hierarchical or relational dimensions as nodes and edges´, with measures to show the significance of its links.",
"homepage": "",
"repository": "https://github.com/qlik-oss/network-vis-chart",
@@ -14,8 +14,7 @@
"sense": "nebula sense --meta resources/meta.json && shx cp resources/network_chart_v1.png sn-network-chart-ext",
"eslint": "eslint src",
"spec": "sy from-jsdoc -c ./spec-configs/props.conf.js",
"test:unit": "jest",
"prepublishOnly": "shx rm -rf dist && shx rm -rf core/esm && shx rm -rf sn-network-chart-ext && yarn build && yarn sense"
"test:unit": "jest"
},
"files": [
"api-specifications",