From cb69e4f1c2326a5e79daf0129147c29e9f575d42 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 14 Dec 2023 15:00:29 -0500 Subject: [PATCH] cleanup dirs --- .github/workflows/module-plugin-test.yml | 35 +++++++++++------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/.github/workflows/module-plugin-test.yml b/.github/workflows/module-plugin-test.yml index 2742276..1387a69 100644 --- a/.github/workflows/module-plugin-test.yml +++ b/.github/workflows/module-plugin-test.yml @@ -111,66 +111,63 @@ jobs: - name: Checkout Module Branch if: ${{ inputs.module-branch != 'main' }} - working-directory: ./vendor/${{ inputs.module-repo }} + working-directory: vendor/${{ inputs.module-repo }} run: git checkout --track origin/${{ inputs.module-branch }} - name: Validate composer.json and composer.lock - working-directory: ./vendor/${{ inputs.module-repo }} + working-directory: vendor/${{ inputs.module-repo }} run: composer validate - name: Install Module PHP Dependencies - working-directory: ./vendor/${{ inputs.module-repo }} + working-directory: vendor/${{ inputs.module-repo }} run: composer install --no-progress --no-dev --optimize-autoloader --prefer-dist - name: Check Module for package file id: package - working-directory: ./vendor/${{ inputs.module-repo }} shell: bash run: | - if [[ -f package.json ]] + if [[ -f vendor/${{ inputs.module-repo }}/package.json ]] then echo "Has package.json file" - echo "hasPackageJson=true" >> $GITHUB_OUTPUT + echo "hasPackageJson='true'" >> $GITHUB_OUTPUT else echo "Does not have package.json file" - echo "hasPackageJson=false" >> $GITHUB_OUTPUT + echo "hasPackageJson='false'" >> $GITHUB_OUTPUT fi - name: Check Module for build script id: build - working-directory: ./vendor/${{ inputs.module-repo }} shell: bash run: | - if grep -wq '"build":' package.json; + if grep -wq '"build":' vendor/${{ inputs.module-repo }}/package.json; then echo "Has build command" - echo "hasBuildCommand=true" >> $GITHUB_OUTPUT + echo "hasBuildCommand='true'" >> $GITHUB_OUTPUT else echo "Does not have build command" - echo "hasBuildCommand=false" >> $GITHUB_OUTPUT + echo "hasBuildCommand='false'" >> $GITHUB_OUTPUT fi - name: Setup Registry for Module - working-directory: ./vendor/${{ inputs.module-repo }} - if: ${{ steps.package.outputs.hasPackageJson }} + working-directory: vendor/${{ inputs.module-repo }} + if: ${{ steps.package.outputs.hasPackageJson == 'true' }} run: printf "\n//npm.pkg.github.com/:_authToken=${{ secrets.NEWFOLD_ACCESS_TOKEN }}" >> .npmrc - name: NPM Install for Module if package.json exists - working-directory: ./vendor/${{ inputs.module-repo }} - if: ${{ steps.package.outputs.hasPackageJson }} + working-directory: vendor/${{ inputs.module-repo }} + if: ${{ steps.package.outputs.hasPackageJson == 'true' }} run: npm ci --legacy-peer-deps - name: Build Module if build command exists - working-directory: ./vendor/${{ inputs.module-repo }} + working-directory: vendor/${{ inputs.module-repo }} if: | - ${{ steps.package.outputs.hasPackageJson }} && - ${{ steps.build.outputs.hasBuildCommand }} + ${{ steps.package.outputs.hasPackageJson == 'true' }} && + ${{ steps.build.outputs.hasBuildCommand == 'true' }} run: npm run build # step to sync js package files with build files - name: Setup Registry for Plugin - # if: ${{ secrets.registry-token }} run: printf "\n//npm.pkg.github.com/:_authToken=${{ secrets.NEWFOLD_ACCESS_TOKEN }}" >> .npmrc - name: NPM Install for Plugin