From 8db1d3b0c12191fda07c2c1c8e0716b31e59cc16 Mon Sep 17 00:00:00 2001 From: zifahm Date: Mon, 3 Jul 2023 11:24:37 +0530 Subject: [PATCH] ci(server): adding typecheck test --- .github/workflows/server.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index 33f75bf..c106f13 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -39,10 +39,28 @@ jobs: - name: 🔬 Lint run: npm run lint + typecheck: + name: ʦ TypeScript + runs-on: ubuntu-latest + steps: + - name: ⬇️ Checkout repo + uses: actions/checkout@v3 + + - name: ⎔ Setup node + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: 📥 Download deps + uses: bahmutov/npm-install@v1 + + - name: 🔎 Type check + run: npm run typecheck --if-present + deploy: name: 🚀 Deploy runs-on: ubuntu-latest - needs: [lint] + needs: [lint, typecheck] # only build/deploy main branch on pushes if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && github.event_name == 'push' }} @@ -61,7 +79,7 @@ jobs: if: ${{ github.ref == 'refs/heads/dev' }} uses: superfly/flyctl-actions@1.3 with: - args: deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} --app ${{ steps.app_name.outputs.value }}-staging -- dockerfile="Dokcerfile.server" + args: deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} --app ${{ steps.app_name.outputs.value }}-staging --dockerfile="Dokcerfile.server" env: FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}