-
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.
feat: add github workflow for frontend
- Loading branch information
Jakub Drbohlav
committed
Mar 2, 2025
1 parent
d01d8af
commit f9c6d2d
Showing
2 changed files
with
64 additions
and
1 deletion.
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,63 @@ | ||
name: Workflow | ||
|
||
on: | ||
pull_request: | ||
types: [synchronize, opened, reopened] | ||
paths: | ||
- "frontend/**" | ||
|
||
defaults: | ||
run: | ||
working-directory: frontend | ||
jobs: | ||
runs-on: ubuntu-latest | ||
|
||
jobs: | ||
build: | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('frontend/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node-modules- | ||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build Vite React app | ||
run: npm run build | ||
|
||
lint: | ||
needs: build | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('frontend/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node-modules- | ||
- name: Run ESLint | ||
run: npm run lint | ||
|
||
- name: Run Prettier | ||
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