Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DNM] debug create-react-admin on CI #10473

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
209 changes: 0 additions & 209 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,201 +10,10 @@ on:
pull_request:

jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Lint
run: make lint
- name: Build
run: make build
- name: Zip packages build artifact
run: zip packages-build.zip -r examples/data-generator/dist packages/*/dist
- name: Upload packages build artifact
uses: actions/upload-artifact@v4
with:
name: packages-build
path: packages-build.zip
retention-days: 1

simple-example-typecheck:
runs-on: ubuntu-latest
needs: [typecheck]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Download packages build artifact
uses: actions/download-artifact@v4
with:
name: packages-build
- name: Unzip packages build artifact
run: unzip -o -u packages-build.zip
- name: Type check simple example
run: cd examples/simple && yarn type-check

doc-videos-format-check:
runs-on: ubuntu-latest
if: github.ref_type != 'tag'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Videos format check
run: make check-documentation-videos-format

doc-check:
runs-on: ubuntu-latest
if: github.ref_type != 'tag'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Jekyll build
run: docker run -v="${PWD}/docs:/site" bretfisher/jekyll build

unit-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Unit Tests
run: make test-unit
env:
CI: true

e2e-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: e2e Tests
run: make test-e2e
env:
CI: true

e-commerce:
runs-on: ubuntu-latest
if: github.ref_type != 'tag'
needs: [typecheck]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Download packages build artifact
uses: actions/download-artifact@v4
with:
name: packages-build
- name: Unzip packages build artifact
run: unzip -o -u packages-build.zip
- name: Build e-commerce
run: make build-demo
env:
# Needed as workaround for Vite https://github.com/vitejs/vite/issues/2433#issuecomment-831399876
# value = (your memory in GiB, 6.51 for GH Actions) * 1024 - 512
NODE_OPTIONS: '--max-old-space-size=6163'
- name: Zip demo build
run: zip demo-build.zip -r examples/demo/dist examples/demo/package.json
- name: Upload demo build artifact
uses: actions/upload-artifact@v4
with:
name: demo-build
path: demo-build.zip
retention-days: 1

crm:
runs-on: ubuntu-latest
if: github.ref_type != 'tag'
needs: [typecheck]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Download packages build artifact
uses: actions/download-artifact@v4
with:
name: packages-build
- name: Unzip packages build artifact
run: unzip -o -u packages-build.zip
- name: Build crm
run: make build-crm

greenframe:
runs-on: ubuntu-latest
name: GreenFrame
needs: [e-commerce]
if: github.event_name == 'push' && github.ref_type == 'tag' && github.ref_name == 'refs/tags/v*' && !contains('beta', github.ref_name) && !contains('alpha', github.ref_name)
steps:
# To use this repository's private action,
# you must check out the repository
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2 # Fetch HEAD^ to enable git comparison
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Download demo build
uses: actions/download-artifact@v4
with:
name: demo-build
- name: Unzip demo build
run: unzip -o -u demo-build.zip
- name: Run e-commerce
# Run the demo in production mode
run: cd ./examples/demo/dist && python3 -m http.server 4173 &
- name: Run GreenFrame Analysis
uses: marmelab/[email protected]
env:
GREENFRAME_SECRET_TOKEN: ${{secrets.GREENFRAME_SECRET_TOKEN}}

create-react-admin:
runs-on: ubuntu-latest
name: create-react-admin
needs: []
if: success() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/next')
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -222,21 +31,3 @@ jobs:
- name: Run the tests
working-directory: ./myadmin
run: npm run test

update-sandbox-repository:
runs-on: ubuntu-latest
# Only run on new tags that target a release (not latest nor next) and avoid alpha and beta tags
if: github.event_name == 'push' && github.ref_type == 'tag' && github.ref_name == 'refs/tags/v*' && !contains('beta', github.ref_name) && !contains('alpha', github.ref_name)
needs: [typecheck, simple-example-typecheck, unit-test, e2e-test]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js LTS
uses: actions/setup-node@v3
with:
node-version: '22.x'
- name: Update Sandbox Repository
env:
SSH_SANDBOX_DEPLOY_KEY: ${{ secrets.SSH_SANDBOX_DEPLOY_KEY }}
SANDBOX_REPOSITORY: ${{ secrets.SANDBOX_REPOSITORY }}
run: make update-sandbox
7 changes: 6 additions & 1 deletion packages/create-react-admin/src/generateAppTestFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ test("should pass", async () => {
}

// Open the first post
fireEvent.click(await screen.findByText("Post 1"));
fireEvent.click(
await screen.findByText("Posts", undefined, { timeout: 4000 }),
);
fireEvent.click(
await screen.findByText("Post 1", undefined, { timeout: 8000 }),
);
fireEvent.click(
await screen.findByText("Edit", undefined, { timeout: 4000 }),
);
Expand Down
Loading