diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 00000000..9c361ee5 --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,33 @@ +name: PR Built Test +on: + pull_request: + types: [opened, edited, reopened, ready_for_review] + +jobs: + Build-Test: + runs-on: ubuntu-latest + steps: + - uses: pnpm/action-setup@v4 + with: + version: 8 + + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Cache dependencies + id: cache + uses: actions/cache@v3 + with: + path: '**/node_modules' + key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}-build + restore-keys: | + ${{ runner.os }}-node- + + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: pnpm install + + - name: Build project + run: pnpm build