Skip to content

feature: Express에 Jest 설치 및 몇 가지 단위 테스트 작성 #8

feature: Express에 Jest 설치 및 몇 가지 단위 테스트 작성

feature: Express에 Jest 설치 및 몇 가지 단위 테스트 작성 #8

Workflow file for this run

name: Build/Test on PR
on:
pull_request:
branches: ['chore/224-express-directory']
jobs:
call-hello:
uses: ./.github/workflows/setup.yml
hello:
runs-on: ubuntu-latest
needs: call-hello
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
- run: echo ${{ needs.call-hello.outputs.a }} ${{ needs.call-hello.outputs.b }}
build-react:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
- run: yarn
- run: yarn web build
build-express:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
- run: yarn
- run: yarn slack build
build-api-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
- run: yarn
- run: yarn api-docs build
test-express:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
- name: Setting .env
run: |
echo "${{ secrets.EXPRESS_ENV_FILE }} >> .env"
mv .env packages/slack/.env
cat packages/slack/.env
# - name: Setting .env
# run: |
# echo "NODE_ENV=${{ secrets.NODE_ENV }}" >> .env
# echo "PORT=${{ secrets.PORT }}" >> .env
# echo "LOCAL_API_ENDPOINT=${{ secrets.LOCAL_API_ENDPOINT }}" >> .env
# echo "DEPLOY_API_ENDPOINT=${{ secrets.DEPLOY_API_ENDPOINT }}" >> .env
# echo "LOCAL_CLIENT_ENDPOINT=${{ secrets.LOCAL_CLIENT_ENDPOINT }}" >> .env
# echo "DEPLOY_CLIENT_ENDPOINT=${{ secrets.DEPLOY_CLIENT_ENDPOINT }}" >> .env
# echo "DEPLOY_CLIENT_ENDPOINT_LEGACY=${{ secrets.DEPLOY_CLIENT_ENDPOINT_LEGACY }}" >> .env
# echo "LOCAL_REDIS_ENDPOINT=${{ secrets.LOCAL_REDIS_ENDPOINT }}" >> .env
# echo "DEPLOY_REDIS_ENDPOINT=${{ secrets.DEPLOY_REDIS_ENDPOINT }}" >> .env
# echo "DEPLOY_REDIS_PASSWORD=${{ secrets.DEPLOY_REDIS_PASSWORD }}" >> .env
# echo "SNS_API_ENDPOINT=${{ secrets.SNS_API_ENDPOINT }}" >> .env
# echo "SLACK_API_ENDPOINT=${{ secrets.SLACK_API_ENDPOINT }}" >> .env
# echo "SLACK_HOOK_ENDPOINT=${{ secrets.SLACK_HOOK_ENDPOINT }}" >> .env
# echo "SLACK_BOT_TOKEN=${{ secrets.SLACK_BOT_TOKEN }}" >> .env
# echo "SLACK_SIGNING_SECRET=${{ secrets.SLACK_SIGNING_SECRET }}" >> .env
# echo "DB_DATABASE=${{ secrets.DB_DATABASE }}" >> .env
# echo "LOCAL_DB_USERNAME=${{ secrets.LOCAL_DB_USERNAME }}" >> .env
# echo "LOCAL_DB_PASSWORD=${{ secrets.LOCAL_DB_PASSWORD }}" >> .env
# echo "DEPLOY_DB_HOST=${{ secrets.DEPLOY_DB_HOST }}" >> .env
# echo "DEPLOY_DB_USERNAME=${{ secrets.DEPLOY_DB_USERNAME }}" >> .env
# echo "DEPLOY_DB_PASSWORD=${{ secrets.DEPLOY_DB_PASSWORD }}" >> .env
# echo "JWT_SECRET_KEY=${{ secrets.JWT_SECRET_KEY }}" >> .env
# echo "JWT_EXPIRES_IN=${{ secrets.JWT_EXPIRES_IN }}" >> .env
# mv .env packages/slack/.env
# cat packages/slack/.env
- run: yarn
- run: yarn slack test