-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add linting and testing for @nodevu/fetchindex
Signed-off-by: Tierney Cyren <[email protected]>
- Loading branch information
Showing
2 changed files
with
49 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,27 @@ | ||
name: "Test Suite: Linter (@nodevu/fetchindex)" | ||
|
||
on: | ||
push: | ||
pull_request: | ||
paths: | ||
- 'fetchindex/**' | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
jobs: | ||
tests: | ||
if: github.repository == 'cutenode/nodevu' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: current | ||
- name: Run npm install -w fetchindex | ||
run: npm install -w fetchindex | ||
- name: Run npm run lint -w fetchindex | ||
run: npm run lint -w fetchindex |
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,22 @@ | ||
name: Publish @nodevu/fetchindex to npm | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# Setup .npmrc file to publish to npm | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'latest' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm install -w fetchindex | ||
- run: npm run lint -w fetchindex | ||
- run: npm run coverage -w fetchindex | ||
- run: npm publish --provenance --access public -w fetchindex | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |