-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add quality checks and dummy publish workflow (#17)
- Loading branch information
Showing
3 changed files
with
72 additions
and
0 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,20 @@ | ||
name: Setup | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install Dependencies | ||
run: yarn install | ||
shell: bash | ||
|
||
- name: Check for changes to yarn.lock | ||
run: git diff --exit-code | ||
shell: bash |
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,25 @@ | ||
name: Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
quality_checks: | ||
uses: Optum/react-hooks/.github/workflows/quality-checks.yml@add_quality_checks | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
needs: quality_checks | ||
steps: | ||
- name: Verify main branch | ||
if: github.ref_name != 'main' | ||
run: | | ||
echo "Invalid branch: can only publish from main" | ||
exit 1 | ||
- name: Setup | ||
uses: Optum/react-hooks/.github/actions/setup@add_quality_checks | ||
|
||
- name: Publish | ||
run: echo Publishing... | ||
|
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 @@ | ||
name: Quality Checks | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
workflow_call: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup | ||
uses: Optum/react-hooks/.github/actions/setup@add_quality_checks | ||
|
||
- name: Run TypeScript Build | ||
run: yarn build | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup | ||
uses: Optum/react-hooks/.github/actions/setup@add_quality_checks | ||
|
||
- name: Run Unit Tests | ||
run: yarn jest | ||
|
||
|