From 9e0a53a496eae984c48d9069ecaa916848c6d4eb Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Sat, 16 Mar 2024 14:57:47 +0100 Subject: [PATCH] Only publish if frontend and backend are okay. --- .github/workflows/frontend-tests.yml | 2 +- .github/workflows/npmpublish.yml | 54 +--------------------------- 2 files changed, 2 insertions(+), 54 deletions(-) diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml index 1f88699..8543a49 100644 --- a/.github/workflows/frontend-tests.yml +++ b/.github/workflows/frontend-tests.yml @@ -5,7 +5,7 @@ name: "Frontend Tests" on: [push] jobs: - test: + test-frontend: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 98f8adb..edffd0a 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -11,62 +11,10 @@ on: - master jobs: - test: - name: "Test release" - runs-on: ubuntu-latest - steps: - # Clone ether/etherpad-lite to ../etherpad-lite so that ep_etherpad-lite - # can be "installed" in this plugin's node_modules. The checkout v2 action - # doesn't support cloning outside of $GITHUB_WORKSPACE (see - # https://github.com/actions/checkout/issues/197), so the repo is first - # cloned to etherpad-lite then moved to ../etherpad-lite. To avoid - # conflicts with this plugin's clone, etherpad-lite must be cloned and - # moved out before this plugin's repo is cloned to $GITHUB_WORKSPACE. - - - uses: actions/checkout@v3 - with: - repository: ether/etherpad-lite - path: etherpad-lite - - - run: mv etherpad-lite .. - # etherpad-lite has been moved outside of $GITHUB_WORKSPACE, so it is now - # safe to clone this plugin's repo to $GITHUB_WORKSPACE. - - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v3 - name: Install pnpm - with: - version: 8 - run_install: false - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - # All of ep_etherpad-lite's devDependencies are installed because the - # plugin might do `require('ep_etherpad-lite/node_modules/${devDep}')`. - # Eventually it would be nice to create an ESLint plugin that prohibits - # Etherpad plugins from piggybacking off of ep_etherpad-lite's - # devDependencies. If we had that, we could change this line to only - # install production dependencies. - - run: pnpm i && pnpm link --global - - - run: cd ../etherpad-lite/src && pnpm i && pnpm link $PLUGIN_NAME - - - - run: pnpm run test - - - run: npm run lint publish-npm: if: github.event_name == 'push' - needs: test + needs: [withplugins, test-frontend] runs-on: ubuntu-latest steps: -