CI: fix Compiler TypeScript workflow (#2946)
Jan Kassens committed
May 7, 2024 at 16:07 UTC
257f22ac571a391b7f01558df74df9cadcdf3f55
1 file changed
+13
-6
.github/workflows/compiler-typescript.yml
renamed
+13
-6
@@ -4,6 +4,13 @@ on:
4
push:
5
branches: [main]
6
pull_request:
7
+ paths:
8
+ - compiler/
9
+ - .github/workflows/compiler-typescript.yml
10
+
11
+defaults:
12
+ run:
13
+ working-directory: compiler
14
15
jobs:
16
discover_yarn_workspaces:
@@ -26,12 +33,12 @@ jobs:
33
with:
34
node-version: 18.x
35
cache: "yarn"
29
- cache-dependency-path: yarn.lock
36
+ cache-dependency-path: compiler/yarn.lock
37
- name: Restore cached node_modules
38
uses: actions/cache@v4
39
with:
40
path: "**/node_modules"
34
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
41
+ key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
42
- run: yarn install --frozen-lockfile
43
- run: yarn workspace babel-plugin-react-compiler prettier:ci
44
- run: yarn workspace babel-plugin-react-compiler lint
@@ -46,13 +53,13 @@ jobs:
53
with:
54
node-version: 18.x
55
cache: "yarn"
49
- cache-dependency-path: yarn.lock
56
+ cache-dependency-path: compiler/yarn.lock
57
- name: Restore cached node_modules
58
uses: actions/cache@v4
59
id: node_modules
60
with:
61
path: "**/node_modules"
55
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
62
+ key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
63
- run: yarn install --frozen-lockfile
64
- run: yarn workspace babel-plugin-react-compiler jest
65
@@ -70,12 +77,12 @@ jobs:
77
with:
78
node-version: 18.x
79
cache: "yarn"
73
- cache-dependency-path: yarn.lock
80
+ cache-dependency-path: compiler/yarn.lock
81
- name: Restore cached node_modules
82
uses: actions/cache@v4
83
id: node_modules
84
with:
85
path: "**/node_modules"
79
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
86
+ key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
87
- run: yarn install --frozen-lockfile
88
- run: yarn workspace ${{ matrix.workspace_name }} test