-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: dependencies and refactor ci (#506)
* chore: bump node version to 20 * chore update dependencies * chore update dependencies * chore: bump node version to 20
- Loading branch information
Showing
7 changed files
with
1,082 additions
and
1,240 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,35 +1,33 @@ | ||
name: 'build-test' | ||
name: "build" | ||
on: | ||
push: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
build: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: ["16", "18"] | ||
node-version: ["20"] | ||
steps: | ||
- uses: actions/checkout@b56e6a3d768b11aef1d4c73977caf6413c0d74c8 # v3.2.0 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install dependencies | ||
run: yarn install --ignore-engines | ||
run: yarn install | ||
|
||
- name: Check format and lint | ||
if: matrix.node-version == 16 | ||
run: yarn run format-check && yarn run lint | ||
|
||
- name: Run tests | ||
run: yarn test | ||
|
||
- name: Build and package | ||
if: matrix.node-version == 16 | ||
run: yarn run build |
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 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 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,41 +1,42 @@ | ||
name: 'sonar' | ||
on: | ||
push: | ||
branches: | ||
- main | ||
# See https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target for security implications. | ||
pull_request_target: | ||
types: [opened, synchronize, reopened] | ||
# name: 'sonar' | ||
# on: | ||
# push: | ||
# branches: | ||
# - main | ||
# # See https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target for security implications. | ||
# pull_request_target: | ||
# types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@b56e6a3d768b11aef1d4c73977caf6413c0d74c8 # v3.2.0 | ||
with: | ||
fetch-depth: 0 | ||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@b56e6a3d768b11aef1d4c73977caf6413c0d74c8 # v3.2.0 | ||
# with: | ||
# fetch-depth: 0 | ||
|
||
- name: Get info | ||
id: info | ||
run: | | ||
echo "repo_name=$(echo $GITHUB_REPOSITORY| cut -d / -f 2)" >> $GITHUB_OUTPUT | ||
echo "repo_owner=$(echo $GITHUB_REPOSITORY| cut -d / -f 1)" >> $GITHUB_OUTPUT | ||
# - name: Get info | ||
# id: info | ||
# run: | | ||
# echo "repo_name=$(echo $GITHUB_REPOSITORY| cut -d / -f 2)" >> $GITHUB_OUTPUT | ||
# echo "repo_owner=$(echo $GITHUB_REPOSITORY| cut -d / -f 1)" >> $GITHUB_OUTPUT | ||
|
||
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: yarn install --ignore-engines | ||
# - uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | ||
# with: | ||
# node-version: 18 | ||
# - name: Install dependencies | ||
# run: yarn install --ignore-engines | ||
|
||
- name: Run all checks and build | ||
run: yarn run all | ||
|
||
- name: SonarCloud Scan | ||
uses: sonarsource/sonarcloud-github-action@db501078e936e4b4c8773d1bb949ba9ddb7b6b6a # v1.9 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
with: | ||
args: > | ||
-Dsonar.organization=${{ steps.info.outputs.repo_owner }} | ||
-Dsonar.projectKey=${{ steps.info.outputs.repo_name }} | ||
# - name: Run all checks and build | ||
# run: yarn run all | ||
|
||
# - name: SonarCloud Scan | ||
# uses: sonarsource/sonarcloud-github-action@db501078e936e4b4c8773d1bb949ba9ddb7b6b6a # v1.9 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
# with: | ||
# args: > | ||
# -Dsonar.organization=${{ steps.info.outputs.repo_owner }} | ||
# -Dsonar.projectKey=${{ steps.info.outputs.repo_name }} |
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 +1 @@ | ||
v18 | ||
v20 |
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
Oops, something went wrong.