diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index c631644..2051625 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -4,6 +4,8 @@ on: push: branches: - main + tags: + - 'v*' jobs: validate: @@ -46,6 +48,15 @@ jobs: - name: Lint ${{ matrix.component }} run: pnpm -F @memegoat/${{ matrix.component }} lint + - name: Test ${{ matrix.component }} + if: matrix.component == 'backend' || matrix.component == 'frontend' + run: | + if pnpm -F @memegoat/${{ matrix.component }} run | grep -q "test"; then + pnpm -F @memegoat/${{ matrix.component }} test + else + echo "No test script found for ${{ matrix.component }}, skipping." + fi + - name: Build ${{ matrix.component }} run: pnpm -F @memegoat/${{ matrix.component }} build env: