Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2338f85

Browse files
ci: set up beta ci/cd
1 parent eddd686 commit 2338f85

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

‎.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ on:
44
push:
55
branches:
66
- 'main'
7+
- 'beta'
78
pull_request: {}
89

910
jobs:
1011
build_test_release:
1112
strategy:
1213
matrix:
13-
node-version: ${{ fromJSON(github.ref == 'refs/heads/main' && '[16]' || '[12,14,16]') }}
14-
os: ${{ fromJSON(github.ref == 'refs/heads/main' && '["ubuntu-latest"]' || '["ubuntu-latest", "windows-latest"]') }}
14+
node-version: ${{ fromJSON((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta') && '[16]' || '[12,14,16]') }}
15+
os: ${{ fromJSON((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta') && '["ubuntu-latest"]' || '["ubuntu-latest", "windows-latest"]') }}
1516
runs-on: ${{ matrix.os }}
1617

1718
steps:
@@ -27,7 +28,7 @@ jobs:
2728
- name: test
2829
run: npm run test
2930
- name: Release
30-
if: github.repository == 'testing-library/angular-testing-library' && github.ref == 'refs/heads/main'
31+
if: github.repository == 'testing-library/angular-testing-library' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta')
3132
run: npx semantic-release
3233
env:
3334
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎.husky/_/husky.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
if [ -z "$husky_skip_init" ]; then
3+
debug () {
4+
[ "$HUSKY_DEBUG" = "1" ] && echo "husky (debug) - 1ドル"
5+
}
6+
7+
readonly hook_name="$(basename "0ドル")"
8+
debug "starting $hook_name..."
9+
10+
if [ "$HUSKY" = "0" ]; then
11+
debug "HUSKY env variable is set to 0, skipping hook"
12+
exit 0
13+
fi
14+
15+
if [ -f ~/.huskyrc ]; then
16+
debug "sourcing ~/.huskyrc"
17+
. ~/.huskyrc
18+
fi
19+
20+
export readonly husky_skip_init=1
21+
sh -e "0ドル" "$@"
22+
exitCode="$?"
23+
24+
if [ $exitCode != 0 ]; then
25+
echo "husky - $hook_name hook exited with code $exitCode (error)"
26+
exit $exitCode
27+
fi
28+
29+
exit 0
30+
fi

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /