Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #49 from nodecfdi/dev
Browse files Browse the repository at this point in the history
chore: version bump 2.0.0
  • Loading branch information
luffynando authored Dec 13, 2023
2 parents 8fe434f + 5cb7556 commit 3f46364
Show file tree
Hide file tree
Showing 58 changed files with 4,233 additions and 3,533 deletions.
18 changes: 9 additions & 9 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 120
Expand Down
9 changes: 0 additions & 9 deletions .eslintignore

This file was deleted.

7 changes: 0 additions & 7 deletions .eslintrc.json

This file was deleted.

128 changes: 64 additions & 64 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,77 +1,77 @@
name: build
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
schedule:
- cron: '0 16 * * 0' # sunday 16:00
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
schedule:
- cron: '0 16 * * 0' # sunday 16:00

jobs:
build:
name: Node unit tests
runs-on: ubuntu-latest
strategy:
matrix:
node: ['16', '17', '18', '19', '20']
steps:
- name: Checkout
uses: actions/checkout@v3
build:
name: Node unit tests
runs-on: ubuntu-latest
strategy:
matrix:
node: ['16', '17', '18', '19', '20']
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cache .pnpm-store
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Cache .pnpm-store
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true
- name: Install dependencies
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: Lint source
run: |
pnpm lint:check
- name: Lint source
run: |
pnpm lint:check
- name: Build package
run: |
pnpm build
- name: Build package
run: |
pnpm build
- name: Run tests
run: |
pnpm test:run
env:
CI: true
- name: Run tests
run: |
pnpm test:run
env:
CI: true

- name: 'Consume changesets'
if: github.event_name == 'push' && github.repository == 'nodecfdi/cfdiutils-common' && matrix.node == 16 && github.ref == 'refs/heads/main'
uses: changesets/action@v1
id: 'changesets'
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm release
commit: 'chore: version bump'
title: Next release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 'Consume changesets'
if: github.event_name == 'push' && github.repository == 'nodecfdi/cfdiutils-common' && matrix.node == 16 && github.ref == 'refs/heads/main'
uses: changesets/action@v1
id: 'changesets'
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm release
commit: 'chore: version bump'
title: Next release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: 'Generate docs'
if: steps.changesets.outputs.published == 'true'
run: pnpm gen:docs
- name: 'Generate docs'
if: steps.changesets.outputs.published == 'true'
run: pnpm gen:docs

- name: Commit docs
if: steps.changesets.outputs.published == 'true'
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'docs: generate docs'
- name: Commit docs
if: steps.changesets.outputs.published == 'true'
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'docs: generate docs'
180 changes: 90 additions & 90 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -1,107 +1,107 @@
name: sonarcloud
on:
push:
branches:
- main
- dev
push:
branches:
- main
- dev

jobs:
tests-coverage:
name: Build code coverage
runs-on: 'ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@v3
tests-coverage:
name: Build code coverage
runs-on: 'ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cache .pnpm-store
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node16-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Cache .pnpm-store
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node16-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Install dependencies
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true
- name: Install dependencies
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: Create code coverage
run: |
pnpm test:coverage
env:
CI: true
- name: Create code coverage
run: |
pnpm test:coverage
env:
CI: true

- name: Store code coverage
uses: actions/upload-artifact@v3
with:
name: code-coverage
path: coverage
- name: Store code coverage
uses: actions/upload-artifact@v3
with:
name: code-coverage
path: coverage

sonarcloud-secrets:
name: SonarCloud check secrets are present
runs-on: ubuntu-latest
outputs:
github: ${{ steps.check-secrets.outputs.github }}
sonar: ${{ steps.check-secrets.outputs.sonar }}
steps:
- name: Check secrets are present
id: check-secrets
run: |
if [ -n "${{ secrets.GITHUB_TOKEN }}" ]; then
echo "github=yes" >> $GITHUB_OUTPUT
else
echo "github=no" >> $GITHUB_OUTPUT
echo "::warning ::GITHUB_TOKEN non set"
fi
if [ -n "${{ secrets.SONAR_TOKEN }}" ]; then
echo "sonar=yes" >> $GITHUB_OUTPUT
else
echo "sonar=no" >> $GITHUB_OUTPUT
echo "::warning ::SONAR_TOKEN non set"
fi
sonarcloud-secrets:
name: SonarCloud check secrets are present
runs-on: ubuntu-latest
outputs:
github: ${{ steps.check-secrets.outputs.github }}
sonar: ${{ steps.check-secrets.outputs.sonar }}
steps:
- name: Check secrets are present
id: check-secrets
run: |
if [ -n "${{ secrets.GITHUB_TOKEN }}" ]; then
echo "github=yes" >> $GITHUB_OUTPUT
else
echo "github=no" >> $GITHUB_OUTPUT
echo "::warning ::GITHUB_TOKEN non set"
fi
if [ -n "${{ secrets.SONAR_TOKEN }}" ]; then
echo "sonar=yes" >> $GITHUB_OUTPUT
else
echo "sonar=no" >> $GITHUB_OUTPUT
echo "::warning ::SONAR_TOKEN non set"
fi
sonarcloud:
name: SonarCloud Scan and Report
needs: ['tests-coverage', 'sonarcloud-secrets']
if: ${{ needs.sonarcloud-secrets.outputs.github == 'yes' && needs.sonarcloud-secrets.outputs.sonar == 'yes' }}
runs-on: 'ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@v3
sonarcloud:
name: SonarCloud Scan and Report
needs: ['tests-coverage', 'sonarcloud-secrets']
if: ${{ needs.sonarcloud-secrets.outputs.github == 'yes' && needs.sonarcloud-secrets.outputs.sonar == 'yes' }}
runs-on: 'ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Unshallow clone to provide blame information
run: git fetch --unshallow
- name: Unshallow clone to provide blame information
run: git fetch --unshallow

- name: Cache .pnpm-store
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node16-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Cache .pnpm-store
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node16-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Install dependencies
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true
- name: Install dependencies
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: Obtain code coverage
uses: actions/download-artifact@v3
with:
name: code-coverage
path: coverage
- name: Obtain code coverage
uses: actions/download-artifact@v3
with:
name: code-coverage
path: coverage

- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

Loading

0 comments on commit 3f46364

Please sign in to comment.