WIP: Add data-access plugin implementation #57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: TypeScript Test | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| name: TypeScript Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Check if typescript files changed | |
| - uses: dorny/paths-filter@v2 | |
| id: filter | |
| with: | |
| filters: | | |
| typescript: | |
| - 'typescript/**' | |
| # Run tests only if typescript files changed | |
| - name: Setup Node.js | |
| if: steps.filter.outputs.typescript == 'true' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Setup pnpm | |
| if: steps.filter.outputs.typescript == 'true' | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: '9' | |
| - name: Install dependencies | |
| if: steps.filter.outputs.typescript == 'true' | |
| working-directory: typescript | |
| run: pnpm install | |
| - name: Build project | |
| if: steps.filter.outputs.typescript == 'true' | |
| working-directory: typescript | |
| run: pnpm build | |
| - name: Run tests | |
| if: steps.filter.outputs.typescript == 'true' | |
| working-directory: typescript | |
| run: pnpm test | |
| # Skip message (not displayed as a separate job) | |
| - name: Skip tests | |
| if: steps.filter.outputs.typescript != 'true' | |
| run: echo "No TypeScript changes detected. Skipping tests." |