-
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.
feat: Add advanced github actions to pipeline
Signed-off-by: Michal Drla <[email protected]>
- Loading branch information
Showing
5 changed files
with
56 additions
and
8 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,22 @@ | ||
name: Build | ||
description: Build the project | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Use Node.js 16.14 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.14 | ||
- name: Cache Node.js modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
- name: Install dependencies | ||
shell: bash | ||
run: npm ci | ||
- name: Optional build | ||
shell: bash | ||
run: npm run build --if-present |
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,11 @@ | ||
name: Lint project | ||
description: Test if linting is followed | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Lint using eslint | ||
shell: bash | ||
run: npm run lint | ||
- name: Lint using prettier | ||
shell: bash | ||
run: npm run prettier-check |
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,8 @@ | ||
name: Test | ||
description: Tests nodejs project | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Test | ||
shell: bash | ||
run: npm test |
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