Skip to content

Commit

Permalink
[ci] Add yarn_test_build job to gh actions
Browse files Browse the repository at this point in the history
ghstack-source-id: 2588f3588f399f332225b353e67efa3816587401
Pull Request resolved: facebook#30072
  • Loading branch information
poteto committed Jul 10, 2024
1 parent bf7aec8 commit 22e91ed
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/runtime_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,66 @@ jobs:
path: |
build
test_build:
name: yarn test-build
needs: build_and_lint
strategy:
matrix:
test_params: [
# Intentionally passing these as strings instead of creating a
# separate parameter per CLI argument, since it's easier to
# control/see which combinations we want to run.
-r=stable --env=development,
-r=stable --env=production,
-r=experimental --env=development,
-r=experimental --env=production,

# Dev Tools
--project=devtools -r=experimental,

# TODO: Update test config to support www build tests
# - "-r=www-classic --env=development --variant=false"
# - "-r=www-classic --env=production --variant=false"
# - "-r=www-classic --env=development --variant=true"
# - "-r=www-classic --env=production --variant=true"
# - "-r=www-modern --env=development --variant=false"
# - "-r=www-modern --env=production --variant=false"
# - "-r=www-modern --env=development --variant=true"
# - "-r=www-modern --env=production --variant=true"

# TODO: Update test config to support xplat build tests
# - "-r=xplat --env=development --variant=false"
# - "-r=xplat --env=development --variant=true"
# - "-r=xplat --env=production --variant=false"
# - "-r=xplat --env=production --variant=true"

# TODO: Test more persistent configurations?
]
continue-on-error: true
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
- name: Restore archived build
uses: actions/download-artifact@v4
with:
path: build
merge-multiple: true
- name: Display structure of build
run: ls -R build
- run: yarn test --build ${{ matrix.test_params }} --ci=github

process_artifacts_combined:
name: Process artifacts combined
needs: build_and_lint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ describe('StoreStressConcurrent', () => {
let store;
let print;

jest.setTimeout(15000);

beforeEach(() => {
global.IS_REACT_ACT_ENVIRONMENT = true;

Expand Down

0 comments on commit 22e91ed

Please sign in to comment.