From 9960c1354b70c336e511ced54ba47b10a0784b0d Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 20 Dec 2023 11:01:52 -0500 Subject: [PATCH 1/3] Simplify CI --- .github/actions/assert-build/action.yml | 30 --------- .../actions/download-built-package/action.yml | 15 ----- .github/actions/setup-job/action.yml | 14 ---- .github/workflows/ci.yml | 66 ++++++------------- 4 files changed, 20 insertions(+), 105 deletions(-) delete mode 100644 .github/actions/assert-build/action.yml delete mode 100644 .github/actions/download-built-package/action.yml delete mode 100644 .github/actions/setup-job/action.yml diff --git a/.github/actions/assert-build/action.yml b/.github/actions/assert-build/action.yml deleted file mode 100644 index cd4bfcf6..00000000 --- a/.github/actions/assert-build/action.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Build and Assert Assets Exists -description: Build the package and assert that file contents exist as we expect -runs: - using: "composite" - steps: - - name: Build and Assert Output - shell: bash - run: |- - echo ' - target: ./addon/dist - setup: - run: pnpm build - cwd: ./addon/ - expect: | - modifiers/sortable-group.js - modifiers/sortable-group.js.map - modifiers/sortable-handle.js - modifiers/sortable-handle.js.map - modifiers/sortable-item.js - modifiers/sortable-item.js.map - test-support/index.js - test-support/index.js.map - ' >> assert-contents.config.yml - npx assert-folder-contents - - - name: Upload dist assets to cache - uses: actions/upload-artifact@v3 - with: - name: dist - path: ./addon/dist diff --git a/.github/actions/download-built-package/action.yml b/.github/actions/download-built-package/action.yml deleted file mode 100644 index a33317d3..00000000 --- a/.github/actions/download-built-package/action.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Download built package from cache -description: Download built package from cache -runs: - using: "composite" - steps: - - name: Download built package from cache - uses: actions/download-artifact@v3 - with: - name: dist - path: ./addon/dist - - # https://github.com/pnpm/pnpm/issues/4965 - - name: 'Install dependencies' - shell: 'bash' - run: pnpm install --force diff --git a/.github/actions/setup-job/action.yml b/.github/actions/setup-job/action.yml deleted file mode 100644 index d3f9612d..00000000 --- a/.github/actions/setup-job/action.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Setup node and package manager -description: Setup node and install dependencies using the package manager -runs: - using: "composite" - steps: - - uses: pnpm/action-setup@v2.2.4 - with: - version: 7 - - uses: actions/setup-node@v4 - with: - cache: 'pnpm' - - name: 'Install dependencies' - shell: 'bash' - run: pnpm install diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 418b6664..f01c6ed3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,28 +8,17 @@ on: pull_request: {} concurrency: - group: ci-${{ github.head_ref || github.ref }} - cancel-in-progress: true + group: ci-${{ github.head_ref || github.ref }} + cancel-in-progress: true jobs: + # Fills the dep cache so parallel jobs can start faster setup: - name: Setup + name: "Setup" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/setup-job - - uses: ./.github/actions/assert-build - - lint: - name: Lint - runs-on: ubuntu-latest - needs: [setup] - - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/setup-job - - name: Lint - run: pnpm lint + - uses: wyvox/action-setup-pnpm@v3 test: name: "Tests" @@ -38,26 +27,19 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/setup-job - - uses: ./.github/actions/download-built-package - - name: Run Tests - run: pnpm test:ember - working-directory: test-app + - uses: wyvox/action-setup-pnpm@v3 + - run: pnpm test - docs: - name: "Docs App" + lint: + name: "Lint" runs-on: ubuntu-latest - # This isn't a strict requirement, but it doesn't make - # sense to test the docs app if the main tests are not passing - needs: [test] + needs: [setup] steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/setup-job - - uses: ./.github/actions/download-built-package - - name: Run Tests - run: pnpm test:ember - working-directory: docs + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup-job + - name: Lint + run: pnpm lint floating: name: "Floating Dependencies" @@ -66,15 +48,10 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/setup-job - - uses: ./.github/actions/download-built-package - - name: Install Dependencies - run: | - rm pnpm-lock.yaml - pnpm install - - name: Run Tests - run: pnpm test:ember - working-directory: test-app + - uses: wyvox/action-setup-pnpm@v3 + with: + args: '--no-lockfile' + - run: pnpm test try-scenarios: name: ${{ matrix.try-scenario }} @@ -93,15 +70,12 @@ jobs: - ember-release - ember-beta - ember-canary - - ember-modifier-4 - - ember-test-helpers-3 - embroider-safe - embroider-optimized steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/setup-job - - uses: ./.github/actions/download-built-package + - uses: wyvox/action-setup-pnpm@v3 - name: Run Tests - run: node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup + run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup working-directory: test-app From 7e3adc0e4ea3a30f13ffbab1bbc96dbf6583afcc Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 20 Dec 2023 11:03:31 -0500 Subject: [PATCH 2/3] Missed some try scenarios --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f01c6ed3..606148fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,6 +70,8 @@ jobs: - ember-release - ember-beta - ember-canary + - ember-modifier-4 + - ember-test-helpers-3 - embroider-safe - embroider-optimized From 56a4c000432c8f35066306d880575a045203d2f4 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 20 Dec 2023 11:03:52 -0500 Subject: [PATCH 3/3] Update lint --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 606148fc..e60f9ead 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,10 +36,10 @@ jobs: needs: [setup] steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/setup-job - - name: Lint - run: pnpm lint + - uses: actions/checkout@v4 + - uses: wyvox/action-setup-pnpm@v3 + - name: Lint + run: pnpm lint floating: name: "Floating Dependencies"