From 215b8033e038cb270e0081ccc09800101bedd177 Mon Sep 17 00:00:00 2001 From: Ariful Alam Date: Mon, 1 Jul 2024 23:53:58 +0600 Subject: [PATCH] Add Test PR workflow --- .github/workflows/test.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1a97976 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +name: Test + +on: + pull_request: + branches: [main] + +jobs: + test-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 20.x + cache: 'npm' + + - name: Restore cache + uses: actions/cache@v4 + with: + path: | + **/node_modules + key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} + + - name: Install dependencies + run: npm ci + + - name: Run lint + run: npm run lint + + - name: Run prettier + run: npm run prettier + + - name: Build + run: npm run build + env: + CI: ''