-
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.
Merge pull request #5 from k2works/develop
Take04 非機能要件
- Loading branch information
Showing
567 changed files
with
51,403 additions
and
6,800 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
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,19 @@ | ||
name: Heroku Backend Develop Deployment | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-22.04 | ||
environment: development | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: akhileshns/[email protected] | ||
with: | ||
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | ||
heroku_app_name: ${{secrets.HEROKU_APP_DEVELOP_NAME}} | ||
heroku_email: ${{secrets.HEROKU_EMAIL}} | ||
appdir: "app/backend/api" # <- This will point to the api folder in your project |
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,19 @@ | ||
name: Heroku Backend Production Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-22.04 | ||
environment: production | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: akhileshns/[email protected] | ||
with: | ||
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | ||
heroku_app_name: ${{secrets.HEROKU_APP_NAME}} | ||
heroku_email: ${{secrets.HEROKU_EMAIL}} | ||
appdir: "app/backend/api" # <- This will point to the api folder in your project |
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,31 +1,76 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
|
||
name: Node.js CI | ||
name: Node.js CI with Npm in frontend directory | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
branches: [ '*' ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x, 19.x, 20.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
working-directory: app/frontend | ||
- run: npm run build --if-present | ||
- run: npm test | ||
working-directory: app/frontend | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js latest | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: latest | ||
cache: 'npm' | ||
- run: npm ci | ||
working-directory: app/frontend | ||
- run: npm test | ||
working-directory: app/frontend | ||
|
||
e2e: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
- name: Grant execute permission for Gradle wrapper | ||
run: chmod +x ./gradlew | ||
working-directory: app/backend/api | ||
- name: Build with Gradle in api directory | ||
run: ./gradlew build -x test | ||
working-directory: app/backend/api | ||
- name: Run with Gradle in api directory | ||
run: ./gradlew bootRun & | ||
working-directory: app/backend/api | ||
|
||
- name: Use Node.js latest | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: latest | ||
cache: 'npm' | ||
- run: npm ci | ||
working-directory: app/frontend | ||
- name: Cypress run | ||
uses: cypress-io/github-action@v5 | ||
with: | ||
build: npm run build | ||
start: npm run dev | ||
wait-on: "http://localhost:5173" | ||
working-directory: app/frontend |
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,45 @@ | ||
name: SonarQube | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
jobs: | ||
build: | ||
name: Build and analyze | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
- name: Grant execute permission for Gradle wrapper | ||
run: chmod +x ./gradlew | ||
working-directory: app/backend/api | ||
|
||
- name: Cache SonarQube packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.sonar/cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v4 | ||
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 sonar --info | ||
working-directory: app/backend/api |
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,29 @@ | ||
name: Vercel FrontEnd Preview Deployment | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_FRONTEND_PROJECT_ID }} | ||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: preview | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Environment Variables | ||
run: | | ||
echo VITE_APP_API_URL=${{ vars.DEV_APP_API_URL }} > .env | ||
working-directory: app/frontend | ||
- name: Install Vercel CLI | ||
run: npm install --global vercel@latest | ||
- name: Pull Vercel Environment Information | ||
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | ||
working-directory: app/frontend | ||
- name: Build Project Artifacts | ||
run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | ||
working-directory: app/frontend | ||
- name: Deploy Project Artifacts to Vercel | ||
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | ||
working-directory: app/frontend |
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,29 @@ | ||
name: Vercel FrontEnd Production Deployment | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_FRONTEND_PROJECT_ID }} | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: production | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Environment Variables | ||
run: | | ||
echo VITE_APP_API_URL=${{ vars.PRD_APP_API_URL }} > .env | ||
working-directory: app/frontend | ||
- name: Install Vercel CLI | ||
run: npm install --global vercel@latest | ||
- name: Pull Vercel Environment Information | ||
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | ||
working-directory: app/frontend | ||
- name: Build Project Artifacts | ||
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | ||
working-directory: app/frontend | ||
- name: Deploy Project Artifacts to Vercel | ||
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | ||
working-directory: app/frontend |
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,45 @@ | ||
name: Vercel Preview Deployment | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Start Database Services | ||
uses: hoverkraft-tech/[email protected] | ||
with: | ||
compose-file: "./docker-compose.yml" | ||
services: | | ||
db_postgresql | ||
- name: Setup Graphviz | ||
uses: tlylt/install-graphviz@main | ||
- name: Setup JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
- name: Grant execute permission for Gradle wrapper | ||
run: chmod +x ./gradlew | ||
working-directory: app/backend/api | ||
- name: Run migrations | ||
run: | | ||
./gradlew assemble | ||
./gradlew flywayMigrate | ||
working-directory: app/backend/api | ||
|
||
- name: Install Vercel CLI | ||
run: npm install --global vercel@latest | ||
- name: Pull Vercel Environment Information | ||
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Build Project Artifacts | ||
run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Deploy Project Artifacts to Vercel | ||
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} |
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,45 @@ | ||
name: Vercel Production Deployment | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Start Database Services | ||
uses: hoverkraft-tech/[email protected] | ||
with: | ||
compose-file: "./docker-compose.yml" | ||
services: | | ||
db_postgresql | ||
- name: Setup Graphviz | ||
uses: tlylt/install-graphviz@main | ||
- name: Setup JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
- name: Grant execute permission for Gradle wrapper | ||
run: chmod +x ./gradlew | ||
working-directory: app/backend/api | ||
- name: Run migrations | ||
run: | | ||
./gradlew assemble | ||
./gradlew flywayMigrate | ||
working-directory: app/backend/api | ||
|
||
- name: Install Vercel CLI | ||
run: npm install --global vercel@latest | ||
- name: Pull Vercel Environment Information | ||
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Build Project Artifacts | ||
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Deploy Project Artifacts to Vercel | ||
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} |
Oops, something went wrong.