diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 474f4e09..73ba1565 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,8 +12,8 @@ env: PERCY_PARALLEL_TOTAL: 9 jobs: - build-test-app: - name: Build test-app + build-docs-app: + name: Build docs-app for testing runs-on: ubuntu-latest timeout-minutes: 5 steps: @@ -29,15 +29,15 @@ jobs: - name: Install dependencies run: yarn install --frozen-lockfile - - name: Build test-app + - name: Build docs-app run: yarn build:test - working-directory: test-app + working-directory: docs-app - - name: Upload test-app + - name: Upload docs-app uses: actions/upload-artifact@v3 with: name: dist - path: test-app/dist + path: docs-app/dist lint: @@ -61,9 +61,9 @@ jobs: run: yarn lint - test-addon: - name: Test addon - needs: [build-test-app] + test-docs-app: + name: Test docs-app + needs: [build-docs-app] runs-on: ubuntu-latest strategy: matrix: @@ -110,15 +110,15 @@ jobs: - name: Install dependencies run: yarn install --frozen-lockfile - - name: Download test-app + - name: Download docs-app uses: actions/download-artifact@v3 with: name: dist - path: test-app/dist + path: docs-app/dist - name: Run tests - run: npx percy exec -- yarn test:ember --path=dist --test-port=${{ matrix.test-port }} - working-directory: test-app + run: npx percy exec -- yarn test:device --path=dist --test-port=${{ matrix.test-port }} + working-directory: docs-app env: DEVICE: ${{ matrix.device }} PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }} @@ -126,8 +126,30 @@ jobs: PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} - test-compatibility: - name: Test compatibility + test-addon: + name: Test addon + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Check out a copy of the repo + uses: actions/checkout@v3 + + - name: Use Node.js ${{ env.NODE_VERSION }} + uses: actions/setup-node@v3 + with: + cache: 'yarn' + node-version: ${{ env.NODE_VERSION }} + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Run tests + run: yarn test + working-directory: test-app + + + test-addon-compatibility: + name: Test addon compatibility runs-on: ubuntu-latest strategy: fail-fast: false @@ -138,20 +160,9 @@ jobs: - 'ember-lts-4.8' - 'ember-release' - 'ember-beta' - # - 'ember-canary' + - 'ember-canary' - 'embroider-safe' - # - 'embroider-optimized' - device: - - 'w1-h3' - - 'w2-h3' - - 'w3-h3' - include: - - device: 'w1-h3' - test-port: 7363 - - device: 'w2-h3' - test-port: 7364 - - device: 'w3-h3' - test-port: 7365 + - 'embroider-optimized' timeout-minutes: 5 steps: - name: Check out a copy of the repo @@ -166,9 +177,6 @@ jobs: - name: Install dependencies run: yarn install --frozen-lockfile - # Test compatibility without Percy - name: Run tests - run: yarn test:ember-compatibility ${{ matrix.scenario }} --- yarn test:ember --test-port=${{ matrix.test-port }} + run: yarn test:ember-compatibility ${{ matrix.scenario }} --- yarn test working-directory: test-app - env: - DEVICE: ${{ matrix.device }} diff --git a/package.json b/package.json index e363fee7..f6a70d35 100644 --- a/package.json +++ b/package.json @@ -15,13 +15,14 @@ "test-app" ], "scripts": { - "build": "yarn workspace ember-container-query run build", - "build:deploy": "yarn workspaces run build", + "build": "concurrently \"npm:build:*\"", + "build:addon": "yarn workspace ember-container-query run build", + "build:docs-app": "yarn workspace docs-app run build", "changelog": "lerna-changelog", "lint": "yarn workspaces run lint", "lint:fix": "yarn workspaces run lint:fix", - "prepare": "yarn build", - "start": "concurrently 'npm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow", + "prepare": "yarn build:addon", + "start": "concurrently \"npm:start:*\" --restart-after 5000 --prefix-colors cyan,white,yellow", "start:addon": "yarn workspace ember-container-query run start", "start:docs-app": "yarn workspace docs-app run start", "test": "yarn workspaces run test"