Skip to content

Replace portals with Popover API for layering #3443

Replace portals with Popover API for layering

Replace portals with Popover API for layering #3443

Workflow file for this run

name: CI
on:
push:
branches:
- main
- master
pull_request: {}
concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
TURBO_API: http://127.0.0.1:9080
TURBO_TOKEN: this-is-not-a-secret
TURBO_TEAM: myself
jobs:
setup:
name: "Setup"
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
pending: ${{ steps.set-pending.outputs.pending }}
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: wyvox/action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm i -f # ensure all bin symlinks are created
- run: pnpm build
- id: set-pending
run: echo "pending=$(./cache-status.sh)" >> $GITHUB_OUTPUT
- run: echo ${{ github.event.number }} > ./pr-number.txt
- id: set-matrix
run: echo "matrix=$(pnpm -s dlx @embroider/try list)" >> $GITHUB_OUTPUT
working-directory: test-app
# Every PR will need linting. Turbo's cache can optimize per-package
lint:
name: Lint
runs-on: ubuntu-latest
needs: [setup]
timeout-minutes: 5
steps:
- uses: wyvox/action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm build
- run: pnpm i -f # sync for some reason isn't running before lint
- run: ls -la ember-primitives/
- run: pnpm lint
test:
name: "Default Tests"
runs-on: ubuntu-latest
needs: [setup]
timeout-minutes: 5
# if: ${{ fromJSON(needs.setup.outputs.pending).test-app.test.status == 'MISS' }}
steps:
- uses: wyvox/action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
node-version: 22
- run: pnpm build
- run: pnpm i -f # sync for some reason isn't running before lint
- run: pnpm turbo test:ember --filter test-app
floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest
needs: [test]
timeout-minutes: 5
# if: ${{ fromJSON(needs.setup.outputs.pending).test-app.test.status == 'MISS' }}
steps:
- uses: wyvox/action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pnpm-args: --no-lockfile
- run: pnpm build
- run: pnpm i -f # sync for some reason isn't running before lint
- run: pnpm turbo test:ember --filter test-app
compatibility:
needs: ["test", "setup"]
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix: ${{fromJson(needs.setup.outputs.matrix)}}
name: "${{ matrix.name }}"
steps:
- uses: wyvox/action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm build
- run: pnpm i -f # sync for some reason isn't running before lint
- name: Apply Scenario
run: pnpm dlx @embroider/try apply ${{ matrix.name }}
working-directory: test-app
- name: Install Dependencies
run: pnpm install --no-lockfile
- name: Run Tests
run: pnpm test:ember
env: ${{ matrix.env }}
working-directory: test-app
# NOTE: Docs' types don't need checking because we check types in the
# Lint phase up above
# This job is for checking specific versions of typescript
typecheck:
name: "${{ matrix.typescript-scenario }}"
runs-on: ubuntu-latest
# if: ${{ fromJSON(needs.setup.outputs.pending).test-app['lint:types'].status == 'MISS' }}
timeout-minutes: 5
needs: [test]
continue-on-error: true
strategy:
fail-fast: true
matrix:
typescript-scenario:
# TS <= 5.4 doesn't have es2023
# - typescript@5.2
# - typescript@5.3
# - typescript@5.4
# TS <= 5.6 doesn't have es2024
# - typescript@5.5
# - typescript@5.6
- typescript@5.7
- typescript@5.8
- typescript@5.9
steps:
- uses: wyvox/action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm build
- run: pnpm i -f # sync for some reason isn't running before lint
- name: "Change TS to ${{ matrix.typescript-scenario }}"
run: "pnpm add --save-dev ${{ matrix.typescript-scenario}}"
working-directory: ./test-app
- name: "Type checking"
run: pnpm --filter 'test-app' lint:types
docs-tests:
name: "Docs' Tests"
# if: ${{ fromJSON(needs.setup.outputs.pending).docs-app.test.status == 'MISS' }}
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [setup]
steps:
- uses: wyvox/action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm build
- run: pnpm i -f # sync for some reason isn't running before lint
- run: pnpm test:ember
working-directory: docs-app
BuildProduction:
name: "Build: Production"
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 15
needs: [setup]
steps:
- uses: wyvox/action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm build
- run: pnpm i -f # sync for some reason isn't running before lint
- run: pnpm build:dev # should be prod. it is prod. but the script is named wrong
working-directory: docs-app
- uses: actions/upload-artifact@v7
with:
name: docs-app-dist
if-no-files-found: error
path: |
./docs-app/dist/**/*
!node_modules/
!./**/node_modules/
DeployProduction:
name: "Deploy: Production"
runs-on: ubuntu-latest
timeout-minutes: 15
needs: [BuildProduction]
permissions:
contents: read
deployments: write
steps:
- uses: actions/download-artifact@v8
with:
name: docs-app-dist
path: docs-app-dist
- name: Publish
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy ./docs-app-dist/ --project-name=ember-primitives