Skip to content

Commit

Permalink
GH workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tiziodcaio committed Sep 15, 2024
1 parent 832e8f1 commit 926ff6d
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 39 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/compiler_playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- run: npx playwright install --with-deps chromium
- run: yarn workspace playground test
3 changes: 2 additions & 1 deletion .github/workflows/compiler_prereleases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- name: Publish packages to npm
run: |
cp ./scripts/release/ci-npmrc ~/.npmrc
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/compiler_typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- run: yarn workspace babel-plugin-react-compiler lint

# Hardcoded to improve parallelism
Expand All @@ -64,7 +65,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- run: yarn workspace babel-plugin-react-compiler jest

test:
Expand All @@ -88,5 +90,6 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- run: yarn workspace ${{ matrix.workspace_name }} test
13 changes: 8 additions & 5 deletions .github/workflows/devtools_regression_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
working-directory: scripts/release
- name: Download react-devtools artifacts for base revision
run: |
Expand Down Expand Up @@ -63,7 +63,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- name: Restore archived build
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -117,7 +118,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- name: Restore all archived build artifacts
uses: actions/download-artifact@v4
- name: Display structure of build
Expand Down Expand Up @@ -151,7 +153,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- name: Restore all archived build artifacts
uses: actions/download-artifact@v4
- name: Display structure of build
Expand Down
53 changes: 34 additions & 19 deletions .github/workflows/runtime_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- run: node ./scripts/tasks/flow-ci ${{ matrix.flow_inline_config_shortname }}

# ----- FIZZ -----
Expand All @@ -69,7 +70,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- run: |
yarn generate-inline-fizz-runtime
git diff --quiet || (echo "There was a change to the Fizz runtime. Run `yarn generate-inline-fizz-runtime` and check in the result." && false)
Expand All @@ -91,7 +93,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- run: yarn flags

# ----- TESTS -----
Expand Down Expand Up @@ -140,7 +143,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- run: yarn test ${{ matrix.params }} --ci --shard=${{ matrix.shard }}

# ----- BUILD -----
Expand Down Expand Up @@ -169,7 +173,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- run: yarn build --index=${{ matrix.worker_id }} --total=20 --r=${{ matrix.release_channel }} --ci
env:
CI: github
Expand Down Expand Up @@ -239,7 +244,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- name: Restore archived build
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -267,7 +273,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- name: Restore archived build
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -310,7 +317,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- name: Restore archived build
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -341,7 +349,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- name: Restore archived build
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -369,8 +378,9 @@ jobs:
with:
path: "**/node_modules"
key: v2-yarn_cache_fixtures_dom-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
- run: corepack enable
- run: yarn
- run: yarn
working-directory: fixtures/dom
- name: Restore archived build
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -409,7 +419,8 @@ jobs:
with:
path: "**/node_modules"
key: v2-yarn_cache_fixtures_flight-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- name: Restore archived build
uses: actions/download-artifact@v4
with:
Expand All @@ -421,9 +432,9 @@ jobs:
- name: Install fixture dependencies
working-directory: fixtures/flight
run: |
yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
yarn
if [ $? -ne 0 ]; then
yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
yarn
fi
- name: Playwright install deps
working-directory: fixtures/flight
Expand Down Expand Up @@ -465,7 +476,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- name: Restore archived build
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -511,7 +523,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- name: Restore archived build
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -543,8 +556,9 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- run: yarn
working-directory: scripts/release
- name: Download artifacts for base revision
run: |
Expand Down Expand Up @@ -582,7 +596,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- name: Restore archived build for PR
uses: actions/download-artifact@v4
with:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/runtime_commit_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
name: yarn install (react)
- run: yarn install --frozen-lockfile
- run: yarn
name: yarn install (scripts/release)
working-directory: scripts/release
- name: Download artifacts for base revision
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/runtime_fuzz_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ jobs:
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: corepack enable
- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn
env:
ELECTRON_SKIP_BINARY_DOWNLOAD: "1"
shell: bash
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/runtime_prereleases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- run: yarn
working-directory: scripts/release
- run: |
scripts/release/prepare-release-from-ci.js --skipTests -r ${{ inputs.release_channel }} --commit=${{ inputs.commit_sha }}
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/shared_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- run: yarn prettier-check

eslint:
Expand All @@ -44,7 +45,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- run: node ./scripts/tasks/eslint

check_license:
Expand All @@ -62,7 +64,8 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- run: ./scripts/ci/check_license.sh

test_print_warnings:
Expand All @@ -80,5 +83,6 @@ jobs:
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: corepack enable
- run: yarn
- run: ./scripts/ci/test_print_warnings.sh
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"publish-prereleases": "echo 'This command has been deprecated. Please refer to https://github.com/facebook/react/tree/main/scripts/release#trigger-an-automated-prerelease'",
"download-build": "node ./scripts/release/download-experimental-build.js",
"download-build-for-head": "node ./scripts/release/download-experimental-build.js --commit=$(git rev-parse HEAD)",
"install-berry": "yarn set version berry && yarn --immutable && cd scripts/release && yarn --immutable",
"install-berry": "yarn set version berry && yarn && cd scripts/release && yarn",
"download-build-in-codesandbox-ci": "yarn build --type=node react/index react-dom/index react-dom/client react-dom/src/server react-dom/test-utils scheduler/index react/jsx-runtime react/jsx-dev-runtime",
"check-release-dependencies": "node ./scripts/release/check-release-dependencies",
"generate-inline-fizz-runtime": "node ./scripts/rollup/generate-inline-fizz-runtime.js",
Expand Down

0 comments on commit 926ff6d

Please sign in to comment.