[ci] Add yarn build_and_lint gh action
Basic copy of the yarn build job combined with linting from circleci without any parallelization ghstack-source-id: 849023cb13e660c11444f7b9874ca91b35222354 Pull Request resolved: https://github.com/facebook/react/pull/30070
Lauren Tan committed
Jul 12, 2024 at 11:21 UTC
4347d391e11e4c497186e54e431f99e01a747fdd
1 file changed
+42
.github/workflows/runtime_build.yml
new
+42
@@ -0,0 +1,42 @@
1
+name: (Runtime) Build
2
+
3
+on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ paths-ignore:
8
+ - compiler/**
9
+
10
+env:
11
+ TZ: /usr/share/zoneinfo/America/Los_Angeles
12
+
13
+jobs:
14
+ build_and_lint:
15
+ name: yarn build and lint
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: actions/setup-node@v4
20
+ with:
21
+ node-version: 18.20.1
22
+ cache: yarn
23
+ cache-dependency-path: yarn.lock
24
+ - uses: actions/setup-java@v4
25
+ with:
26
+ distribution: temurin
27
+ java-version: 11.0.22
28
+ - name: Restore cached node_modules
29
+ uses: actions/cache@v4
30
+ id: node_modules
31
+ with:
32
+ path: "**/node_modules"
33
+ key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
34
+ - run: yarn install --frozen-lockfile
35
+ - run: yarn build
36
+ - run: yarn lint-build
37
+ - name: Cache build
38
+ uses: actions/cache@v4
39
+ id: build_cache
40
+ with:
41
+ path: build/**
42
+ key: yarn-build-${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}