This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from nodecfdi/dev
chore: version bump 2.0.0
- Loading branch information
Showing
58 changed files
with
4,233 additions
and
3,533 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.