From 6539d6aa06fe88fd5a7041f30a1b1838d727918b Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 24 Jun 2024 14:12:40 -0400 Subject: [PATCH] [ci] Add yarn build and yarn lint build gh action Basic copy of the yarn build & yarn lint build jobs from circleci without any parallelization ghstack-source-id: b583559ce9ffb2cce30ca9bc3e209897d681ed5a Pull Request resolved: https://github.com/facebook/react/pull/30070 --- .github/workflows/runtime_build.yml | 60 +++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/runtime_build.yml diff --git a/.github/workflows/runtime_build.yml b/.github/workflows/runtime_build.yml new file mode 100644 index 0000000000000..6753b083298f2 --- /dev/null +++ b/.github/workflows/runtime_build.yml @@ -0,0 +1,60 @@ +name: (Runtime) Build + +on: + push: + branches: [main] + pull_request: + paths-ignore: + - 'compiler/**' + +jobs: + build: + name: yarn build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18.x + cache: "yarn" + cache-dependency-path: 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') }} + - run: yarn install --frozen-lockfile + - run: yarn build + - name: Cache build + uses: actions/cache@v4 + id: build_cache + with: + path: "build/**" + key: yarn-build-${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + + lint_build: + name: yarn lint-build + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18.x + cache: "yarn" + cache-dependency-path: 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') }} + - name: Restore cached build + uses: actions/cache@v4 + id: build_cache + with: + path: "build/**" + key: yarn-build-${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + - run: yarn install --frozen-lockfile + - run: yarn lint-build