-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
➖ (chore) [DSDK-256]: Remove husky dependency (#51)
- Loading branch information
Showing
12 changed files
with
123 additions
and
52 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
is_running_on_github_actions() { | ||
[ -n "$CI" ] && [ -n "$GITHUB_ACTIONS" ] | ||
} | ||
|
||
run_danger_on_github_actions() { | ||
echo "Script is running within GitHub Actions workflow." | ||
pnpm danger ci --dangerfile danger/dangerfile.ts --failOnErrors | ||
} | ||
|
||
run_danger_on_local() { | ||
echo "Script is running locally." | ||
pnpm danger pr --dangerfile danger/dangerfile.ts https://github.com/LedgerHQ/device-sdk-ts/pull/${1} | ||
} | ||
|
||
if is_running_on_github_actions; then | ||
run_danger_on_github_actions | ||
else | ||
if [ -z "$1" ]; then | ||
echo "Argument PR number is missing" | ||
exit 1 | ||
fi | ||
run_danger_on_local "$1" | ||
fi | ||
|
File renamed without changes.
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 |
---|---|---|
|
@@ -11,40 +11,48 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
auto-assign: | ||
name: Auto assign | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- uses: toshimaru/[email protected] | ||
|
||
danger: | ||
name: Pass Danger check | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: ./actions/setup-toolchain-composite | ||
|
||
- uses: toshimaru/[email protected] | ||
- uses: ./.github/actions/setup-toolchain-composite | ||
|
||
- name: Danger | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Workaround when using custom runners | ||
# https://github.com/danger/danger-js/issues/1374 | ||
DANGER_GITHUB_API_BASE_URL: "https://api.github.com" | ||
run: pnpm danger ci --dangerfile danger/dangerfile.ts --failOnErrors | ||
run: ./.github/actions/danger-check.sh | ||
|
||
health-check: | ||
name: Pass health check | ||
needs: [danger] | ||
runs-on: [device-sdk-4xlarge-linux] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: ./actions/setup-toolchain-composite | ||
- uses: ./.github/actions/setup-toolchain-composite | ||
|
||
- name: Lint | ||
run: pnpm lint | ||
- name: health check | ||
run: pnpm health-check | ||
|
||
- name: Prettier | ||
run: pnpm prettier | ||
unit-tests: | ||
name: Launch unit tests | ||
needs: [danger] | ||
runs-on: [device-sdk-4xlarge-linux] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Typecheck | ||
run: pnpm typecheck | ||
- uses: ./.github/actions/setup-toolchain-composite | ||
|
||
- name: Test | ||
run: pnpm test:coverage -- --max-warnings=0 | ||
|
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 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 +1,2 @@ | ||
lib/* | ||
lib/* | ||
coverage/* |
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,2 @@ | ||
lib/* | ||
lib/* | ||
coverage/* |
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,2 @@ | ||
lib/* | ||
lib/* | ||
coverage/* |
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,2 @@ | ||
lib/* | ||
lib/* | ||
coverage/* |
Oops, something went wrong.