-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from bluesatunsw/main
Fast forward to master
- Loading branch information
Showing
6 changed files
with
82 additions
and
81 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 |
---|---|---|
|
@@ -3,15 +3,15 @@ name: Frontend | |
on: | ||
push: | ||
paths: | ||
- 'frontend-react/**' | ||
- 'frontend/**' | ||
pull_request: | ||
paths: | ||
- 'frontend-react/**' | ||
- 'frontend/**' | ||
|
||
jobs: | ||
|
||
frontend_lint_ts: | ||
name: TS Lint | ||
frontend_lint: | ||
name: React Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout commit | ||
|
@@ -20,18 +20,18 @@ jobs: | |
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
node-version: '16' | ||
|
||
- name: Install Modules | ||
working-directory: ./frontend-react | ||
working-directory: ./frontend | ||
run: npm install | ||
|
||
- name: Run ESLint | ||
working-directory: ./frontend-react | ||
run: npm run lint-ts | ||
working-directory: ./frontend | ||
run: npm run lint | ||
|
||
frontend_lint_html: | ||
name: HTML Lint | ||
frontend_build: | ||
name: React Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout commit | ||
|
@@ -40,54 +40,14 @@ jobs: | |
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
node-version: '16' | ||
|
||
- name: Install Modules | ||
working-directory: ./frontend-react | ||
run: npm install | ||
|
||
- name: Run HTMLHint | ||
working-directory: ./frontend-react | ||
run: npm run lint-html | ||
|
||
frontend_lint_css: | ||
name: CSS Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout commit | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install Modules | ||
working-directory: ./frontend-react | ||
run: npm install | ||
|
||
- name: Run Stylelint | ||
working-directory: ./frontend-react | ||
run: npm run lint-css | ||
|
||
frontend_build_ts: | ||
name: TS Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout commit | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install Modules | ||
working-directory: ./frontend-react | ||
working-directory: ./frontend | ||
run: npm install | ||
|
||
- name: Run TSC | ||
working-directory: ./frontend-react | ||
working-directory: ./frontend | ||
run: npm run build | ||
|
||
frontend_lighthouse: | ||
|
@@ -102,18 +62,18 @@ jobs: | |
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
node-version: '16' | ||
|
||
- name: Install Modules | ||
working-directory: ./frontend-react | ||
run: npm install && npm install -g @lhci/[email protected] | ||
working-directory: ./frontend | ||
run: npm install && npm install -g @lhci/[email protected] && npm install -g http-server | ||
|
||
- name: Build Website | ||
working-directory: ./frontend-react | ||
working-directory: ./frontend | ||
run: npm run build | ||
|
||
- name: Generate Report | ||
working-directory: ./frontend-react | ||
working-directory: ./frontend | ||
run: | ||
lhci autorun | ||
env: | ||
|
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,9 @@ | ||
module.exports = { | ||
env: { | ||
browser: true | ||
}, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:react/recommended" | ||
] | ||
} |
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 |
---|---|---|
@@ -1,17 +1,44 @@ | ||
module.exports = { | ||
ci: { | ||
collect: { | ||
"staticDistDir": "./" | ||
}, | ||
assert: { | ||
"preset": "lighthouse:no-pwa", | ||
"assertions": { | ||
"csp-xss": "off", | ||
"unused-javascript": ["warn", {"maxNumericValue": 1}] | ||
} | ||
}, | ||
upload: { | ||
"target": "temporary-public-storage" | ||
"ci": { | ||
"collect": { | ||
"url": [ | ||
"http://127.0.0.1:4000" | ||
], | ||
"startServerCommand": "http-server ./build -p 4000 -g", | ||
"startServerReadyPattern": "Available on", | ||
"numberOfRuns": 3, | ||
"settings": { | ||
"chromeFlags": "--no-sandbox", | ||
"formFactor": "desktop", | ||
"throttling": { | ||
"rttMs": 40, | ||
"throughputKbps": 10 * 1024, | ||
"cpuSlowdownMultiplier": 1, | ||
"requestLatencyMs": 0, | ||
"downloadThroughputKbps": 0, | ||
"uploadThroughputKbps": 0, | ||
}, | ||
"screenEmulation": { | ||
"mobile": false, | ||
"width": 1350, | ||
"height": 940, | ||
"deviceScaleFactor": 1, | ||
"disabled": false, | ||
}, | ||
"emulatedUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4695.0 Safari/537.36 Chrome-Lighthouse" | ||
} | ||
}, | ||
"upload": { | ||
"target": "temporary-public-storage" | ||
}, | ||
"assert": { | ||
"preset": "lighthouse:no-pwa", | ||
"assertions": { | ||
"csp-xss": "off", | ||
"unused-javascript": ["warn", {"maxNumericValue": 1}], | ||
"uses-text-compression": "off", | ||
"uses-long-cache-ttl": "off" | ||
} | ||
} | ||
}; | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
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