Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c400419
commit 7c967d1
Showing
10 changed files
with
97 additions
and
250 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,37 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
setup: | ||
name: Setup | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cancel previous | ||
uses: styfle/cancel-workflow-action@0.11.0 | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
cache: 'npm' | ||
- name: Install deps 🧶 | ||
run: npm ci | ||
|
||
build: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
cache: 'npm' | ||
- run: npm ci | ||
- name: Build lib 👷♂️ | ||
run: npm 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Coverage | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
coverage-badge: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
cache: 'npm' | ||
- name: Install deps 🧶 | ||
run: npm ci | ||
- name: Build | ||
run: npm run build | ||
- name: Test | ||
run: npm run test:badge | ||
|
||
# Only run the coverage once | ||
- name: Get Coverage for badge | ||
run: | | ||
SUMMARY="$(npm run test:badge | tail -2 | head -1)" | ||
TOKENS=($SUMMARY) | ||
echo "COVERAGE=$(echo ${TOKENS[2]})" >> $GITHUB_ENV | ||
REF=${{ github.ref }} | ||
echo "github.ref: $REF" | ||
IFS='/' read -ra PATHS <<< "$REF" | ||
BRANCH_NAME="${PATHS[1]}_${PATHS[2]}" | ||
echo $BRANCH_NAME | ||
echo "BRANCH=$(echo ${BRANCH_NAME})" >> $GITHUB_ENV | ||
- name: Create the Badge | ||
uses: schneegans/dynamic-badges-action@v1.0.0 | ||
with: | ||
auth: ${{ secrets.GIST_SECRET }} | ||
gistID: f3a173e87a763056b73438f503680993 | ||
filename: pdap-design-system__${{ env.BRANCH }}.json | ||
label: Test Coverage | ||
message: ${{ env.COVERAGE }} | ||
color: green | ||
namedLogo: vitest | ||
style: for-the-badge |
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,3 +1,6 @@ | ||
{ | ||
"recommendations": ["tailwind.tailwindcss", "vue.volar", "vue.vscode-typescript-vue-plugin"] | ||
} | ||
"recommendations": [ | ||
"tailwind.tailwindcss", | ||
"vue.volar" | ||
] | ||
} |
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 was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Oops, something went wrong.