-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release v1.1.0
- Loading branch information
Showing
285 changed files
with
9,447 additions
and
1,943 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 |
---|---|---|
@@ -1,38 +1,47 @@ | ||
name: sonar backend | ||
name: sonarqube backend | ||
|
||
on: | ||
pull_request: | ||
branches: [dev] | ||
paths: ["backend/**"] | ||
types: [opened, synchronize, reopened] | ||
|
||
defaults: | ||
run: | ||
working-directory: backend | ||
|
||
jobs: | ||
build: | ||
name: sonar backend | ||
name: sonarqube backend | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: checkout source | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
fetch-depth: 0 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Cache SonarCloud packages | ||
|
||
- name: Cache SonarQube packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.sonar/cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
|
||
- name: Build and analyze | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: ./gradlew build | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} | ||
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST_URL }} | ||
run: ./gradlew build sonarqube --info |
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,12 +1,14 @@ | ||
name: sonar frontend | ||
name: frontend | ||
on: | ||
pull_request: | ||
branches: [dev] | ||
paths: ["frontend/**"] | ||
paths: ['frontend/**'] | ||
types: [opened, synchronize, reopened] | ||
|
||
defaults: | ||
run: | ||
working-directory: frontend | ||
|
||
jobs: | ||
sonarcloud: | ||
name: sonar frontend | ||
|
@@ -15,3 +17,131 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- run: npm ci | ||
- run: npm run build | ||
|
||
lhci: | ||
name: Lighthouse CI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: NPM CI | ||
run: | | ||
npm ci | ||
- name: Build | ||
run: | | ||
npm run build | ||
- name: Lighthouse Run | ||
env: | ||
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} | ||
run: | | ||
npm install -g @lhci/cli | ||
lhci autorun || echo "LHCI failed!" | ||
- name: Format lighthouse score | ||
id: format_lighthouse_score | ||
uses: actions/github-script@v3 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const fs = require('fs'); | ||
const results = JSON.parse(fs.readFileSync('${{ github.workspace }}/frontend/lhci_reports/manifest.json')); | ||
let comments = ""; | ||
const { summary, jsonPath } = results[0]; | ||
const details = JSON.parse(fs.readFileSync(jsonPath)); | ||
const { audits } = details; | ||
const formatResult = (res) => Math.round(res * 100); | ||
Object.keys(summary).forEach( | ||
(key) => (summary[key] = formatResult(summary[key])) | ||
); | ||
const score = (res) => (res >= 90 ? "🟢" : res >= 50 ? "🟠" : "🔴"); | ||
const comment = [ | ||
`## ⚡️ Lighthouse Report`, | ||
`| Category | Score |`, | ||
`| --- | --- |`, | ||
`| ${score(summary.performance)} Performance | ${summary.performance} |`, | ||
`| ${score(summary.accessibility)} Accessibility | ${summary.accessibility} |`, | ||
`| ${score(summary[`best-practices`])} Best Practices | ${summary[`best-practices`]} |`, | ||
`| ${score(summary.seo)} Seo | ${summary.seo} |`, | ||
`| ${score(summary.pwa)} Pwa | ${summary.pwa} |` | ||
].join("\n"); | ||
const detail = [ | ||
``, | ||
`| Category | Score |`, | ||
`| --- | --- |`, | ||
`| ${score( | ||
audits[`first-contentful-paint`].score * 100 | ||
)} First Contentful Paint | ${ | ||
audits[`first-contentful-paint`].displayValue | ||
} |`, | ||
`| ${score( | ||
audits[`speed-index`].score * 100 | ||
)} Speed Index | ${ | ||
audits[`speed-index`].displayValue | ||
} |`, | ||
`| ${score( | ||
audits[`total-blocking-time`].score * 100 | ||
)} Total Blocking Time | ${ | ||
audits[`total-blocking-time`].displayValue | ||
} |`, | ||
`| ${score( | ||
audits[`largest-contentful-paint`].score * 100 | ||
)} Largest Contentful Paint | ${ | ||
audits[`largest-contentful-paint`].displayValue | ||
} |`, | ||
`| ${score( | ||
audits[`cumulative-layout-shift`].score * 100 | ||
)} Cumulative Layout Shift | ${ | ||
audits[`cumulative-layout-shift`].displayValue | ||
} |` | ||
].join("\n"); | ||
comments += comment + "\n" + detail + "\n"; | ||
core.setOutput('comments', comments); | ||
- name: Comment PR | ||
uses: unsplash/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
msg: ${{ steps.format_lighthouse_score.outputs.comments}} | ||
|
||
cypress-run: | ||
name: Cypress E2E CI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cypress CI | ||
uses: cypress-io/github-action@v4 | ||
with: | ||
browser: chrome | ||
headed: true | ||
build: npm run build | ||
start: npm run start | ||
wait-on: 'http://localhost:3000' | ||
record: true | ||
parallel: true | ||
working-directory: frontend | ||
env: | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COMMIT_INFO_MESSAGE: ${{github.event.pull_request.title}} | ||
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha}} | ||
continue-on-error: true |
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,3 @@ | ||
[[ErrorCode]] | ||
== 에러 코드 | ||
operation::errorCode[snippets='error-code'] |
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
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
7 changes: 7 additions & 0 deletions
7
backend/src/main/java/com/woowacourse/gongcheck/auth/application/OAuthClient.java
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,7 @@ | ||
package com.woowacourse.gongcheck.auth.application; | ||
|
||
import com.woowacourse.gongcheck.auth.application.response.SocialProfileResponse; | ||
|
||
public interface OAuthClient { | ||
SocialProfileResponse requestSocialProfileByCode(String code); | ||
} |
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
Oops, something went wrong.