Skip to content

Fix upgrading task in task #1358

Fix upgrading task in task

Fix upgrading task in task #1358

name: Test Sass and JavaScript Compilation
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
Build:
runs-on: ubuntu-22.04
steps:
- name: Create a Drupal project
run: composer create-project drupal/recommended-project . --ignore-platform-reqs
- uses: actions/checkout@v4
with:
path: drainpipe
- name: Setup drainpipe-dev
run: mv drainpipe/drainpipe-dev .
- uses: ./drainpipe/scaffold/github/actions/common/set-env
- name: Install DDEV
uses: ./drainpipe/scaffold/github/actions/common/ddev
with:
git-name: Drainpipe Bot
git-email: no-reply@example.com
- name: Setup Project
run: |
ddev config --auto
ddev config --nodejs-version "22"
ddev config --corepack-enable
ddev start
ddev composer config extra.drupal-scaffold.gitignore true
ddev composer config --json extra.drupal-scaffold.allowed-packages '["lullabot/drainpipe-dev", "lullabot/drainpipe"]'
ddev composer config --no-plugins allow-plugins.composer/installers true
ddev composer config --no-plugins allow-plugins.drupal/core-composer-scaffold true
ddev composer config --no-plugins allow-plugins.lullabot/drainpipe true
ddev composer config --no-plugins allow-plugins.lullabot/drainpipe-dev true
ddev composer config repositories.drainpipe --json '{"type": "path", "url": "drainpipe", "options": {"symlink": false}}'
ddev composer config repositories.drainpipe-dev --json '{"type": "path", "url": "drainpipe-dev", "options": {"symlink": false}}'
ddev composer config minimum-stability dev
ddev composer require "lullabot/drainpipe @dev" --with-all-dependencies
ddev composer require "lullabot/drainpipe-dev @dev" --dev --with-all-dependencies
- name: Setup Test Files
run: |
cp drainpipe/tests/fixtures/metapackages/Taskfile.yml .
cp drainpipe/tests/fixtures/metapackages/style.scss .
cp -R drainpipe/tests/fixtures/metapackages/js .
- name: Create Artifact
run: zip -r /tmp/drainpipe.zip ./
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: test-metapackage-build
path: /tmp/drainpipe.zip
Test-Sass-NPM:
runs-on: ubuntu-22.04
needs: Build
steps:
- uses: actions/download-artifact@v4
with:
name: test-metapackage-build
- name: Restore Workspace
run: |
cd ../
mv ${{ github.workspace }}/drainpipe.zip /tmp/drainpipe.zip
unzip -o /tmp/drainpipe.zip -d ${{ github.workspace }}
cd ${{ github.workspace }}
- uses: ./drainpipe/scaffold/github/actions/common/set-env
- name: Install DDEV
uses: ./drainpipe/scaffold/github/actions/common/ddev
with:
git-name: Drainpipe Bot
git-email: no-reply@example.com#
- name: Start DDEV
run: ddev start
- name: Setup Sass
run: |
ddev npm init -y
ddev npm install drainpipe/metapackages/sass --save-dev
- name: Compile Sass
run: ddev task sass
Test-Sass-Yarn-Classic:
runs-on: ubuntu-22.04
needs: Build
steps:
- uses: actions/download-artifact@v4
with:
name: test-metapackage-build
- name: Restore Workspace
run: |
cd ../
mv ${{ github.workspace }}/drainpipe.zip /tmp/drainpipe.zip
unzip -o /tmp/drainpipe.zip -d ${{ github.workspace }}
cd ${{ github.workspace }}
- uses: ./drainpipe/scaffold/github/actions/common/set-env
- name: Install DDEV
uses: ./drainpipe/scaffold/github/actions/common/ddev
with:
git-name: Drainpipe Bot
git-email: no-reply@example.com#
- name: Start DDEV
run: ddev start
- name: Setup Sass
run: |
ddev exec corepack disable
ddev exec npm i -g yarn@1.22.1
ddev exec 'ln -s $(npm root -g)/yarn/bin/yarn /usr/local/bin/yarn'
ddev exec yarn init -y
ddev exec yarn add file:./drainpipe/metapackages/sass --dev
- name: Compile Sass
run: ddev task sass
Test-Sass-Yarn-3:
runs-on: ubuntu-22.04
needs: Build
steps:
- uses: actions/download-artifact@v4
with:
name: test-metapackage-build
- name: Restore Workspace
run: |
cd ../
mv ${{ github.workspace }}/drainpipe.zip /tmp/drainpipe.zip
unzip -o /tmp/drainpipe.zip -d ${{ github.workspace }}
cd ${{ github.workspace }}
- uses: ./drainpipe/scaffold/github/actions/common/set-env
- name: Install DDEV
uses: ./drainpipe/scaffold/github/actions/common/ddev
with:
git-name: Drainpipe Bot
git-email: no-reply@example.com#
- name: Start DDEV
run: ddev start
- name: Setup Sass
run: |
ddev yarn set version berry
ddev yarn set version 3
ddev yarn init -y
ddev yarn add ./drainpipe/metapackages/sass --dev
- name: Compile Sass
run: ddev task sass
Test-Sass-Yarn-4:
runs-on: ubuntu-22.04
needs: Build
steps:
- uses: actions/download-artifact@v4
with:
name: test-metapackage-build
- name: Restore Workspace
run: |
cd ../
mv ${{ github.workspace }}/drainpipe.zip /tmp/drainpipe.zip
unzip -o /tmp/drainpipe.zip -d ${{ github.workspace }}
cd ${{ github.workspace }}
- uses: ./drainpipe/scaffold/github/actions/common/set-env
- name: Install DDEV
uses: ./drainpipe/scaffold/github/actions/common/ddev
with:
git-name: Drainpipe Bot
git-email: no-reply@example.com#
- name: Start DDEV
run: ddev start
- name: Setup Sass
run: |
ddev restart
ddev yarn set version berry
ddev yarn set version 4
ddev yarn init -y
ddev yarn cache clear
ddev yarn add ./drainpipe/metapackages/sass --dev
- name: Compile Sass
run: ddev task sass
Test-JavaScript-NPM:
runs-on: ubuntu-22.04
needs: Build
steps:
- uses: actions/download-artifact@v4
with:
name: test-metapackage-build
- name: Restore Workspace
run: |
cd ../
mv ${{ github.workspace }}/drainpipe.zip /tmp/drainpipe.zip
unzip -o /tmp/drainpipe.zip -d ${{ github.workspace }}
cd ${{ github.workspace }}
- uses: ./drainpipe/scaffold/github/actions/common/set-env
- name: Install DDEV
uses: ./drainpipe/scaffold/github/actions/common/ddev
with:
git-name: Drainpipe Bot
git-email: no-reply@example.com#
- name: Start DDEV
run: ddev start
- name: Setup Sass
run: |
ddev npm init -y
ddev npm install focus-trap@^6.7.3
ddev npm install drainpipe/metapackages/javascript --save-dev
- name: Compile JavaScript
run: ddev task javascript
Test-JavaScript-Yarn-Classic:
runs-on: ubuntu-22.04
needs: Build
steps:
- uses: actions/download-artifact@v4
with:
name: test-metapackage-build
- name: Restore Workspace
run: |
cd ../
mv ${{ github.workspace }}/drainpipe.zip /tmp/drainpipe.zip
unzip -o /tmp/drainpipe.zip -d ${{ github.workspace }}
cd ${{ github.workspace }}
- uses: ./drainpipe/scaffold/github/actions/common/set-env
- name: Install DDEV
uses: ./drainpipe/scaffold/github/actions/common/ddev
with:
git-name: Drainpipe Bot
git-email: no-reply@example.com#
- name: Start DDEV
run: ddev start
- name: Setup Sass
run: |
ddev exec corepack disable
ddev exec npm i -g yarn@1.22.1
ddev exec 'ln -s $(npm root -g)/yarn/bin/yarn /usr/local/bin/yarn'
ddev exec yarn init -y
ddev exec yarn add focus-trap@^6.7.3
ddev exec yarn add file:./drainpipe/metapackages/javascript --dev
- name: Compile JavaScript
run: ddev task javascript
Test-JavaScript-Yarn-3:
runs-on: ubuntu-22.04
needs: Build
steps:
- uses: actions/download-artifact@v4
with:
name: test-metapackage-build
- name: Restore Workspace
run: |
cd ../
mv ${{ github.workspace }}/drainpipe.zip /tmp/drainpipe.zip
unzip -o /tmp/drainpipe.zip -d ${{ github.workspace }}
cd ${{ github.workspace }}
- uses: ./drainpipe/scaffold/github/actions/common/set-env
- name: Install DDEV
uses: ./drainpipe/scaffold/github/actions/common/ddev
with:
git-name: Drainpipe Bot
git-email: no-reply@example.com#
- name: Start DDEV
run: ddev start
- name: Setup Sass
run: |
ddev yarn set version berry
ddev yarn set version 3
ddev yarn init -y
ddev yarn add focus-trap@^6.7.3
ddev yarn add ./drainpipe/metapackages/javascript --dev
- name: Compile JavaScript
run: ddev task javascript
Test-JavaScript-Yarn-4:
runs-on: ubuntu-22.04
needs: Build
steps:
- uses: actions/download-artifact@v4
with:
name: test-metapackage-build
- name: Restore Workspace
run: |
cd ../
mv ${{ github.workspace }}/drainpipe.zip /tmp/drainpipe.zip
unzip -o /tmp/drainpipe.zip -d ${{ github.workspace }}
cd ${{ github.workspace }}
- uses: ./drainpipe/scaffold/github/actions/common/set-env
- name: Install DDEV
uses: ./drainpipe/scaffold/github/actions/common/ddev
with:
git-name: Drainpipe Bot
git-email: no-reply@example.com#
- name: Start DDEV
run: ddev start
- name: Setup Sass
run: |
ddev restart
ddev yarn set version berry
ddev yarn set version 4
ddev yarn init -y
ddev yarn cache clear
ddev yarn add focus-trap@^6.7.3
ddev yarn add ./drainpipe/metapackages/javascript --dev
- name: Compile JavaScript
run: ddev task javascript