Skip to content

그룹 카테고리 순서를 변경한다. #338

그룹 카테고리 순서를 변경한다.

그룹 카테고리 순서를 변경한다. #338

Workflow file for this run

name: Motimate BE CI
on:
push:
paths:
- 'BE/**'
- '.github/**'
branches: [ "develop", "main" ]
pull_request:
paths:
- 'BE/**'
- '.github/**'
branches: [ "develop", "main" ]
jobs:
build:
runs-on: ubuntu-latest
env:
TEST_ENV: "CI"
services:
mysql:
image: mysql:8.0.34
env:
MYSQL_ROOT_PASSWORD: ${{ secrets.DB_PASSWORD }}
MYSQL_DATABASE: ${{ secrets.DB_DATABASE }}
ports:
- 13306:3306
strategy:
matrix:
node-version: [18.x]
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'
cache-dependency-path: BE/package-lock.json
- name: Generate .env file
run: |
cat << EOF > ./BE/.test.env
DB=${{ secrets.DB }}
DB_HOST=${{ secrets.DB_HOST }}
DB_PORT=${{ secrets.DB_PORT }}
DB_USERNAME=${{ secrets.DB_USERNAME }}
DB_PASSWORD=${{ secrets.DB_PASSWORD }}
DB_DATABASE=${{ secrets.DB_DATABASE }}
DB_ENTITIES=${{ secrets.DB_ENTITIES }}
DB_LOGGING=${{ secrets.DB_LOGGING }}
DB_SYNC: ${{ secrets.DB_SYNC }}
SWAGGER_TITLE=${{ secrets.SWAGGER_TITLE }}
SWAGGER_DESCRIPTION=${{ secrets.SWAGGER_DESCRIPTION }}
SWAGGER_VERSION=${{ secrets.SWAGGER_VERSION }}
SWAGGER_TAG=${{ secrets.SWAGGER_TAG }}
APPLE_PUBLIC_KEY_URL=${{ secrets.APPLE_PUBLIC_KEY_URL }}
APPLE_TOKEN_URL=${{ secrets.APPLE_TOKEN_URL }}
APPLE_REVOKE_URL=${{ secrets.APPLE_REVOKE_URL }}
APPLE_CLIENT_ID=${{ secrets.APPLE_CLIENT_ID }}
APPLE_KEY_ID=${{ secrets.APPLE_KEY_ID }}
APPLE_TEAM_ID=${{ secrets.APPLE_TEAM_ID }}
APPLE_AUD=${{ secrets.APPLE_AUD }}
APPLE_PRIVATE_KEY=${{ secrets.APPLE_PRIVATE_KEY }}
JWT_SECRET=${{ secrets.JWT_SECRET }}
JWT_VALIDITY=${{ secrets.JWT_VALIDITY }}
REFRESH_JWT_SECRET=${{ secrets.REFRESH_JWT_SECRET }}
REFRESH_JWT_VALIDITY=${{ secrets.REFRESH_JWT_VALIDITY }}
LOCAL_BASEPATH=${{ secrets.LOCAL_BASEPATH }}
NCP_ENDPOINT=${{ secrets.BCRYPT_SALT }}
NCP_REGION=${{ secrets.NCP_REGION }}
NCP_ACCESS_KEY_ID=${{ secrets.NCP_ACCESS_KEY_ID }}
NCP_SECRET_ACCESS_KEY=${{ secrets.NCP_SECRET_ACCESS_KEY }}
NCP_BUCKET_NAME=${{ secrets.NCP_BUCKET_NAME }}
FILESTORE_PREFIX: ${{ secrets.FILESTORE_PREFIX }}
FILESTORE_IMAGE_PREFIX: ${{ secrets.FILESTORE_IMAGE_PREFIX }}
FILESTORE_THUMBNAIL_PREFIX: ${{ secrets.FILESTORE_THUMBNAIL_PREFIX }}
GROUP_AVATAR_URLS: ${{ secrets.GROUP_AVATAR_URLS }}
USER_AVATAR_URLS: ${{ secrets.USER_AVATAR_URLS }}
EOF
- name: Install dependencies
run: npm ci
working-directory: ./BE
- name: Build
run: npm run build --if-present
working-directory: ./BE
- name: Run tests
run: npm run test:cov
working-directory: ./BE
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}