chore(td): change gh workflow to test only changed files #2433
Workflow file for this run
This file contains 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: Main workflow | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build_lint_and_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: | | |
git checkout -b main origin/main | |
git checkout - | |
- name: Install pnpm | |
uses: pnpm/[email protected] | |
id: pnpm-install | |
with: | |
run_install: false | |
- name: Setup Node (uses version in .nvmrc) | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Building packages | |
run: pnpm build | |
- name: Running static type checking | |
run: pnpm typecheck | |
- name: Running linters and tests | |
run: pnpm jest --projects jest.{eslint,test}.config.js --reporters jest-silent-reporter --changedSince=main | |
env: | |
CI: true |