-
Notifications
You must be signed in to change notification settings - Fork 662
chore(ci): add matrix workflow to build demo apps [skip i18n] #1361
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,70 @@ | ||||||
| name: Build Demo Apps | ||||||
|
|
||||||
| on: | ||||||
| workflow_dispatch: | ||||||
| pull_request: | ||||||
| branches: [ main ] | ||||||
|
|
||||||
| jobs: | ||||||
| build-demos: | ||||||
| name: Build demo/${{ matrix.app }} | ||||||
| runs-on: ubuntu-latest | ||||||
| strategy: | ||||||
| fail-fast: false | ||||||
| matrix: | ||||||
| app: [next-app, vite-project, adonisjs, react-router-app] | ||||||
| permissions: | ||||||
| contents: read | ||||||
| steps: | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@v4 | ||||||
| with: | ||||||
| fetch-depth: 0 | ||||||
|
|
||||||
| - name: Use Node.js | ||||||
| uses: actions/setup-node@v4 | ||||||
| with: | ||||||
| node-version: 20.12.2 | ||||||
|
|
||||||
| - name: Install pnpm | ||||||
| uses: pnpm/action-setup@v4 | ||||||
| id: pnpm-install | ||||||
| with: | ||||||
| version: 9.12.3 | ||||||
| run_install: false | ||||||
|
|
||||||
| - name: Configure pnpm cache | ||||||
| id: pnpm-cache | ||||||
| run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||||||
|
|
||||||
| - name: Restore pnpm cache | ||||||
| uses: actions/cache@v3 | ||||||
| with: | ||||||
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||||||
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||||||
| restore-keys: | | ||||||
| ${{ runner.os }}-pnpm-store- | ||||||
|
|
||||||
| - name: Install dependencies | ||||||
| run: pnpm install --frozen-lockfile | ||||||
|
|
||||||
| - name: Setup Turbo telemetry | ||||||
| run: pnpm turbo telemetry disable | ||||||
|
|
||||||
| - name: Configure Turbo cache | ||||||
| uses: dtinth/setup-github-actions-caching-for-turbo@v1 | ||||||
|
|
||||||
| - name: Build demo app | ||||||
| env: | ||||||
| CI: true | ||||||
| run: | | ||||||
| mkdir -p logs | ||||||
| pnpm turbo build --force --filter ./demo/${{ matrix.app }} 2>&1 | tee logs/build-${{ matrix.app }}.log | ||||||
|
||||||
| pnpm turbo build --force --filter ./demo/${{ matrix.app }} 2>&1 | tee logs/build-${{ matrix.app }}.log | |
| pnpm turbo build --filter ./demo/${{ matrix.app }} 2>&1 | tee logs/build-${{ matrix.app }}.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
actions/cache@v3action is outdated. Sinceactions/upload-artifact@v4is being used elsewhere in this workflow (line 66), it would be more consistent to useactions/cache@v4here as well. Using the latest version provides better performance and compatibility with current GitHub Actions infrastructure.