-
-
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.
Signed-off-by: Lexus Drumgold <[email protected]>
- Loading branch information
1 parent
2c4d3e2
commit 402bed6
Showing
122 changed files
with
457 additions
and
468 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
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 |
---|---|---|
|
@@ -19,10 +19,12 @@ hmarr | |
iife | ||
jchen | ||
kaisugi | ||
ksort | ||
lcov | ||
lintstagedrc | ||
mkbuild | ||
mlly | ||
nocheck | ||
nvmrc | ||
pathe | ||
pjson | ||
|
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 |
---|---|---|
|
@@ -58,8 +58,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
outputs: | ||
cache-key: ${{ steps.cache-key.outputs.result }} | ||
version: ${{ steps.version.outputs.result }} | ||
test-files: ${{ steps.test-files.outputs.files_exists }} | ||
typecheck-files: ${{ steps.typecheck-files.outputs.files_exists }} | ||
version-typescript: ${{ steps.version-typescript.outputs.result }} | ||
version: ${{ steps.version.outputs.result }} | ||
steps: | ||
- id: debug | ||
name: Print environment variables and event payload | ||
|
@@ -97,6 +99,16 @@ jobs: | |
- id: version-typescript | ||
name: Get TypeScript version | ||
run: echo "result=$(jq .devDependencies.typescript package.json -r)" >>$GITHUB_OUTPUT | ||
- id: test-files | ||
name: Check for test files | ||
uses: andstor/[email protected] | ||
with: | ||
files: '**/__tests__/*.spec.+(mts|tsx)' | ||
- id: typecheck-files | ||
name: Check for typecheck files | ||
uses: andstor/[email protected] | ||
with: | ||
files: '**/__tests__/*.spec-d.mts' | ||
commitlint: | ||
needs: preflight | ||
runs-on: ubuntu-latest | ||
|
@@ -248,43 +260,34 @@ jobs: | |
- 5.5.4 | ||
- 5.4.5 | ||
- 5.0.4 | ||
if: ${{ fromJson(needs.preflight.outputs.typecheck-files) }} | ||
steps: | ||
- id: checkout | ||
name: Checkout ${{ env.REF_NAME }} | ||
uses: actions/[email protected] | ||
with: | ||
persist-credentials: false | ||
ref: ${{ env.REF }} | ||
- id: test-files-check | ||
name: Check for typecheck files | ||
uses: andstor/[email protected] | ||
with: | ||
files: '**/__tests__/*.spec-d.ts' | ||
- id: node | ||
if: steps.test-files-check.outputs.files_exists == 'true' | ||
name: Setup Node.js | ||
uses: actions/[email protected] | ||
with: | ||
cache: yarn | ||
cache-dependency-path: yarn.lock | ||
node-version-file: .nvmrc | ||
- id: cache | ||
if: steps.test-files-check.outputs.files_exists == 'true' | ||
name: Restore dependencies cache | ||
uses: actions/[email protected] | ||
with: | ||
key: ${{ needs.preflight.outputs.cache-key }} | ||
path: ${{ env.CACHE_PATH }} | ||
- id: typescript | ||
if: steps.test-files-check.outputs.files_exists == 'true' | ||
name: Install typescript@${{ matrix.typescript-version }} | ||
run: yarn add -D typescript@${{ matrix.typescript-version }} | ||
- id: print-typescript-version | ||
if: steps.test-files-check.outputs.files_exists == 'true' | ||
name: Print TypeScript version | ||
run: jq .devDependencies.typescript package.json -r | ||
- id: typecheck | ||
if: steps.test-files-check.outputs.files_exists == 'true' | ||
name: Run typecheck | ||
run: yarn typecheck | ||
test: | ||
|
@@ -302,20 +305,15 @@ jobs: | |
COVERAGE_SUMMARY: ./coverage/coverage-summary.json | ||
PCT: .total.branches.pct + .total.functions.pct + .total.lines.pct + .total.statements.pct | ||
VITEST_REPORT: ./.vitest-reports/test.blob.json | ||
if: ${{ fromJson(needs.preflight.outputs.test-files) }} | ||
steps: | ||
- id: checkout | ||
name: Checkout ${{ env.REF_NAME }} | ||
uses: actions/[email protected] | ||
with: | ||
persist-credentials: false | ||
ref: ${{ env.REF }} | ||
- id: test-files-check | ||
name: Check for test files | ||
uses: andstor/[email protected] | ||
with: | ||
files: '**/__tests__/*.spec.+(ts|tsx)' | ||
- id: node | ||
if: steps.test-files-check.outputs.files_exists == 'true' | ||
name: Setup Node.js v${{ matrix.node-version }} | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -324,35 +322,30 @@ jobs: | |
check-latest: true | ||
node-version: ${{ matrix.node-version }} | ||
- id: cache | ||
if: steps.test-files-check.outputs.files_exists == 'true' | ||
name: Restore dependencies cache | ||
uses: actions/[email protected] | ||
with: | ||
key: ${{ needs.preflight.outputs.cache-key }} | ||
path: ${{ env.CACHE_PATH }} | ||
- id: test | ||
if: steps.test-files-check.outputs.files_exists == 'true' | ||
name: Run tests | ||
run: | | ||
yarn test:cov --coverage.thresholds.100=false \ | ||
&& echo "coverage=$(jq '${{ env.PCT }}' ${{ env.COVERAGE_SUMMARY }} -r)" >>$GITHUB_OUTPUT | ||
- id: report | ||
if: steps.test-files-check.outputs.files_exists == 'true' | ||
name: Upload report | ||
uses: actions/[email protected] | ||
with: | ||
name: ${{ format('vitest-report-{0}-{1}.json', github.event.repository.name, env.SHA) }} | ||
path: ${{ env.VITEST_REPORT }} | ||
- id: coverage-summary | ||
if: steps.test-files-check.outputs.files_exists == 'true' | ||
name: Upload coverage summary | ||
uses: actions/[email protected] | ||
with: | ||
name: | | ||
${{ format('coverage-summary-{0}-{1}.json', github.event.repository.name, env.SHA) }} | ||
path: ${{ env.COVERAGE_SUMMARY }} | ||
- id: codecov | ||
if: steps.test-files-check.outputs.files_exists == 'true' | ||
name: Upload coverage report to Codecov | ||
uses: codecov/[email protected] | ||
env: | ||
|
@@ -373,9 +366,7 @@ jobs: | |
token: ${{ secrets.CODECOV_TOKEN }} | ||
verbose: true | ||
- id: coverage-failure | ||
if: | | ||
steps.test-files-check.outputs.files_exists == 'true' | ||
&& ${{ toJson(steps.test.outputs.coverage) }} != 400 | ||
if: ${{ toJson(steps.test.outputs.coverage) }} != 400 | ||
name: Coverage threshold failure (${{ steps.test.outputs.coverage }}) | ||
run: yarn test:cov:reports | ||
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
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
File renamed without changes.
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
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Oops, something went wrong.