diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b16a6197..ca68962b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,25 +1,48 @@ -# 1 워크플로의 이름 지정 name: CI -# 2 워크플로가 시작될 조건 지정 on: push: - branches: [step1] + branches: + - step1 + pull_request: + branches: + - hojeong26 + # paths: // path는 특정 폴더에 변경사항이 생겼을 때 작동하도록 설정할 수 있음 + # - "services/**" jobs: build: - runs-on: ubuntu-latest # 3 실행 환경 지정 - #4 실행스텝지정 + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '18' + + - name: Install Dependencies + run: npm install + + - name: Build + run: npm run build + + test: + runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v3 + - name: Checkout Repository + uses: actions/checkout@v2 - - uses: actions/setup-java@v3 + - name: Set up Node.js + uses: actions/setup-node@v2 with: - distribution: 'zulu' - java-version: '17' + node-version: '18' - - name: Grant execute permission for gradlew - run: chmod +x gradlew + - name: Install Dependencies + run: npm install - - name: Build with Gradle - run: ./gradlew clean build + - name: Run Test + run: npm test