-
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.
chore: Extract lint, test and build to another workflow
- Loading branch information
1 parent
b84a9a3
commit 3ae7b9f
Showing
2 changed files
with
70 additions
and
49 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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Lint, Test and Build | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
job_lint: | ||
name: Lint | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout, Setup Node.js v${{ env.NODE_VERSION }} and Install dependencies | ||
uses: manferlo81/action-checkout-node-install@v0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
env: | ||
NODE_VERSION: 20.x | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
job_test_and_build: | ||
strategy: | ||
matrix: | ||
os: | ||
- name: Window | ||
image: windows-latest | ||
- name: Ubuntu | ||
image: ubuntu-latest | ||
- name: macOS | ||
image: macos-latest | ||
node-version: | ||
- 18.x | ||
- 20.x | ||
- 21.x | ||
- 22.x | ||
|
||
name: Test and Build ( ${{ matrix.os.name }}, Node.js v${{ matrix.node-version }} ) | ||
|
||
runs-on: ${{ matrix.os.image }} | ||
needs: job_lint | ||
|
||
steps: | ||
- name: Checkout, Setup Node.js v${{ matrix.node-version }} and Install dependencies | ||
uses: manferlo81/action-checkout-node-install@v0 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Test | ||
run: npm test | ||
env: | ||
SKIP_COVERAGE: true | ||
|
||
- name: Build | ||
run: npm run build |