diff --git a/.github/workflows/buildTest.yml b/.github/workflows/buildTest.yml new file mode 100644 index 0000000..52a470c --- /dev/null +++ b/.github/workflows/buildTest.yml @@ -0,0 +1,33 @@ +name: React Build Test + +on: + pull_request: + branches: + - develop + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 21 + + - name: Cache yarn + uses: actions/cache@v4 + id: yarn-cache + with: + path: '**/node_modules' + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + + # cache hit 못하면 패키지 설치 + - name: Install dependencies + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn install + + - name: Run build test + run: yarn build