Skip to content

Commit

Permalink
rename to frontend and correct lint & test
Browse files Browse the repository at this point in the history
  • Loading branch information
Babali42 committed Dec 17, 2024
1 parent cf360dd commit d7ccecd
Show file tree
Hide file tree
Showing 103 changed files with 418 additions and 582 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/deploy-ghpage.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/deploy-github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy Angular App to GitHub Pages
on:
push:
branches:
- main # Adjust this to your default branch
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18 # Ensure this matches your project's Node.js version

- name: Install Dependencies
run: npm install
working-directory: frontend/

- name: Build Angular App
run: npm run build -- --output-path ../dist
working-directory: frontend/

- name: Copy CNAME file
run: |
echo "www.drumbeatrepo.com" > dist/CNAME
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GHPAGES }}
publish_dir: dist
22 changes: 19 additions & 3 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ on:

jobs:
eslint:
defaults:
run:
working-directory: ./frontend

name: Run eslint scanning
runs-on: ubuntu-latest
permissions:
Expand All @@ -32,17 +36,29 @@ jobs:
run: |
npm install [email protected]
npm install @microsoft/[email protected]
npx eslint --version
npm list @microsoft/eslint-formatter-sarif
- name: Run ESLint
run: npx eslint .
--config .eslintrc.js
--ext .ts
--format @microsoft/eslint-formatter-sarif
--output-file eslint-results.sarif
--output-file eslint-results.sarif || exit 0
continue-on-error: true

- name: Check ESLint Output
run: |
pwd
ls -la
- name: Verify ESLint output
run: |
ls -l eslint-results.sarif
cat eslint-results.sarif
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: eslint-results.sarif
wait-for-processing: true
sarif_file: frontend/eslint-results.sarif
wait-for-processing: true
6 changes: 5 additions & 1 deletion .github/workflows/jest-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:

jobs:
test:
defaults:
run:
working-directory: ./frontend

runs-on: ubuntu-latest

steps:
Expand All @@ -22,7 +26,7 @@ jobs:
node-version: '18.13'

- name: Install dependencies
run: npm install
run: npm ci

- name: Run tests
run: npm run test
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions front/.eslintrc.js → frontend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
ignorePatterns: [".eslintrc.js", "karma.conf.js"],
plugins: [
"@angular-eslint/eslint-plugin",
"@typescript-eslint"
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion front/angular.json → frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/drum-beat-repo",
"outputPath": "../dist",
"baseHref": "/",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
Expand Down
File renamed without changes.
Loading

0 comments on commit d7ccecd

Please sign in to comment.