From 257f22ac571a391b7f01558df74df9cadcdf3f55 Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Tue, 7 May 2024 16:07:46 -0400 Subject: [PATCH] CI: fix Compiler TypeScript workflow (#2946) --- ...typescript.yml => compiler-typescript.yml} | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) rename .github/workflows/{typescript.yml => compiler-typescript.yml} (86%) diff --git a/.github/workflows/typescript.yml b/.github/workflows/compiler-typescript.yml similarity index 86% rename from .github/workflows/typescript.yml rename to .github/workflows/compiler-typescript.yml index 7cc958369c..fc635b88e9 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/compiler-typescript.yml @@ -4,6 +4,13 @@ on: push: branches: [main] pull_request: + paths: + - compiler/ + - .github/workflows/compiler-typescript.yml + +defaults: + run: + working-directory: compiler jobs: discover_yarn_workspaces: @@ -26,12 +33,12 @@ jobs: with: node-version: 18.x cache: "yarn" - cache-dependency-path: yarn.lock + cache-dependency-path: compiler/yarn.lock - name: Restore cached node_modules uses: actions/cache@v4 with: path: "**/node_modules" - key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }} - run: yarn install --frozen-lockfile - run: yarn workspace babel-plugin-react-compiler prettier:ci - run: yarn workspace babel-plugin-react-compiler lint @@ -46,13 +53,13 @@ jobs: with: node-version: 18.x cache: "yarn" - cache-dependency-path: yarn.lock + cache-dependency-path: compiler/yarn.lock - name: Restore cached node_modules uses: actions/cache@v4 id: node_modules with: path: "**/node_modules" - key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }} - run: yarn install --frozen-lockfile - run: yarn workspace babel-plugin-react-compiler jest @@ -70,12 +77,12 @@ jobs: with: node-version: 18.x cache: "yarn" - cache-dependency-path: yarn.lock + cache-dependency-path: compiler/yarn.lock - name: Restore cached node_modules uses: actions/cache@v4 id: node_modules with: path: "**/node_modules" - key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }} - run: yarn install --frozen-lockfile - run: yarn workspace ${{ matrix.workspace_name }} test