-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:adobe/spacecat-shared
- Loading branch information
Showing
359 changed files
with
132,510 additions
and
32,224 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: "Lint, Test, and Coverage" | ||
description: "Runs lint and test commands, plus coverage" | ||
|
||
inputs: | ||
codecov_token: | ||
description: "Codecov Token (optional)" | ||
required: false | ||
default: "" | ||
upload_coverage: | ||
description: "Whether to upload coverage to Codecov (true/false). Default false." | ||
required: false | ||
default: "false" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Lint | ||
run: npm run lint | ||
shell: bash | ||
|
||
- name: Test | ||
run: npm run test | ||
shell: bash | ||
|
||
- name: Upload coverage to Codecov | ||
if: ${{ inputs.upload_coverage == 'true' }} | ||
uses: codecov/codecov-action@v5 | ||
with: | ||
token: ${{ inputs.codecov_token }} |
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,32 @@ | ||
name: "Setup Node & NPM (with cache)" | ||
description: "Checks out code, sets up Node, uses NPM cache, installs dependencies" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.12 | ||
|
||
- name: Get npm cache directory | ||
id: npm-cache-dir | ||
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: Set up NPM Cache | ||
uses: actions/cache@v4 | ||
id: npm-cache | ||
with: | ||
path: ${{ steps.npm-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Update NPM (only if cache miss) | ||
run: npm install -g [email protected] | ||
shell: bash | ||
|
||
- name: Install dependencies (only if cache miss) | ||
run: npm ci | ||
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
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.