From efc10b501ee5488e3126ad3a11464cfd9e01a6e4 Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Fri, 19 Aug 2022 15:54:36 +0200 Subject: [PATCH] Re-enabled Ghost-CLI tests in CI - this required some reworking for the new monorepo setup, but this commit should now enable the Ghost-CLI tests in CI again - also switched upgrade test to v4 to support Node 16 --- .github/workflows/test.yml | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7608e4680c..d919daa5a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -303,11 +303,8 @@ jobs: ghost-cli: name: Ghost-CLI - if: false + if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/')) runs-on: ubuntu-18.04 - defaults: - run: - working-directory: ghost/core steps: - uses: actions/checkout@v3 with: @@ -317,29 +314,39 @@ jobs: env: FORCE_COLOR: 0 with: - node-version: '14.17.0' + node-version: '16.13.0' cache: yarn - - run: npm install -g ghost-cli@latest - - run: npm --no-git-tag-version version minor # We need to artificially bump the minor version to get migrations to run - - run: zip -r ghost.zip . + - name: Install Ghost-CLI + run: npm install -g ghost-cli@latest + + - run: yarn + + - run: npm --no-git-tag-version version minor # We need to artificially bump the minor version to get migrations to run + working-directory: ghost/core + + - run: npm pack + working-directory: ghost/core + + - run: mv ghost-*.tgz ghost.tgz + working-directory: ghost/core - name: Clean Install run: | DIR=$(mktemp -d) - ghost install local -d $DIR --zip $(pwd)/ghost.zip + ghost install local -d $DIR --archive $(pwd)/ghost/core/ghost.tgz - name: Latest Release run: | DIR=$(mktemp -d) ghost install local -d $DIR - ghost update -d $DIR --zip $(pwd)/ghost.zip + ghost update -d $DIR --archive $(pwd)/ghost/core/ghost.tgz - - name: Update from latest v3 + - name: Update from latest v4 run: | DIR=$(mktemp -d) - ghost install v3 --local -d $DIR - ghost update -f -d $DIR --zip $(pwd)/ghost.zip + ghost install v4 --local -d $DIR + ghost update -f -d $DIR --archive $(pwd)/ghost/core/ghost.tgz - name: Print debug logs if: failure() @@ -354,7 +361,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} canary: - needs: [lint, admin-tests, admin-prod-build, migrations, unit-tests, database-tests] + needs: [lint, ghost-cli, admin-tests, admin-prod-build, migrations, unit-tests, database-tests] if: github.event_name == 'push' && github.ref == 'refs/heads/main' name: Canary uses: tryghost/actions/.github/workflows/canary.yml@main