diff --git a/.github/workflows/pr-basic-tests.yml b/.github/workflows/pr-basic-tests.yml index 045c275..0610124 100644 --- a/.github/workflows/pr-basic-tests.yml +++ b/.github/workflows/pr-basic-tests.yml @@ -11,9 +11,9 @@ jobs: strategy: matrix: leia-tests: - - examples/basics + - basics lando-versions: - - edge + - 3-dev os: - ubuntu-22.04 node-version: @@ -30,16 +30,13 @@ jobs: cache: yarn - name: Install Yarn dependencies run: yarn install --prefer-offline --frozen-lockfile - - # This block should eventually become use lando/actions-hyperdrive@v2 - - name: Verify Docker dependencies - run: | - docker --version | grep "20.10." - docker-compose --version | grep "1.29." - - name: Grab latest edge Lando CLI - run: | - sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-${{ matrix.lando-versions }}" - sudo chmod +x /usr/local/bin/lando + - name: Setup lando ${{ matrix.lando-version }} + uses: lando/setup-lando@v2 + with: + lando-version: ${{ matrix.lando-version }} + config: | + plugins.@lando/platformsh=/home/runner/work/platformsh/platformsh + telemetry: false - name: Move in lando config appropriate for testing run: | mkdir -p ~/.lando/cache @@ -50,20 +47,10 @@ jobs: run: | lando version lando config --path plugins | grep platformsh | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - cd ${{ matrix.leia-tests }} - lando config --path plugins | grep platformsh | grep dir | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - - # This block should eventually become use lando/actions-leia@v2 - # @NOTE? Do we want a way for our leia-action to configure apparmor since - # this might break a whole bunch of tests? or is this literally just a thing - # for the platform.sh mysql/mariadb container? - - name: Configure apparmor - run: | - set -x - sudo apt-get remove mysql-server --purge - sudo apt-get install apparmor-profiles - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - - name: Run leia tests - shell: bash - run: yarn leia "./${{ matrix.leia-tests }}/README.md" -c 'Destroy tests' --stdin --shell bash - + - name: Run Leia Tests + uses: lando/run-leia-action@v2 + with: + leia-test: "./examples/${{ matrix.leia-tests }}/README.md" + cleanup-header: "Destroy tests" + shell: bash + stdin: true diff --git a/.github/workflows/pr-chrome-headless-tests.yml b/.github/workflows/pr-chrome-headless-tests.yml index 1ed0e79..faf4baa 100644 --- a/.github/workflows/pr-chrome-headless-tests.yml +++ b/.github/workflows/pr-chrome-headless-tests.yml @@ -11,9 +11,9 @@ jobs: strategy: matrix: leia-tests: - - examples/chrome-headless-73 + - chrome-headless-73 lando-versions: - - edge + - 3-dev os: - ubuntu-22.04 node-version: @@ -30,16 +30,13 @@ jobs: cache: yarn - name: Install Yarn dependencies run: yarn install --prefer-offline --frozen-lockfile - - # This block should eventually become use lando/actions-hyperdrive@v2 - - name: Verify Docker dependencies - run: | - docker --version | grep "20.10." - docker-compose --version | grep "1.29." - - name: Grab latest edge Lando CLI - run: | - sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-${{ matrix.lando-versions }}" - sudo chmod +x /usr/local/bin/lando + - name: Setup lando ${{ matrix.lando-version }} + uses: lando/setup-lando@v2 + with: + lando-version: ${{ matrix.lando-version }} + config: | + plugins.@lando/platformsh=/home/runner/work/platformsh/platformsh + telemetry: false - name: Move in lando config appropriate for testing run: | mkdir -p ~/.lando/cache @@ -50,20 +47,10 @@ jobs: run: | lando version lando config --path plugins | grep platformsh | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - cd ${{ matrix.leia-tests }} - lando config --path plugins | grep platformsh | grep dir | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - - # This block should eventually become use lando/actions-leia@v2 - # @NOTE? Do we want a way for our leia-action to configure apparmor since - # this might break a whole bunch of tests? or is this literally just a thing - # for the platform.sh mysql/mariadb container? - - name: Configure apparmor - run: | - set -x - sudo apt-get remove mysql-server --purge - sudo apt-get install apparmor-profiles - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - - name: Run leia tests - shell: bash - run: yarn leia "./${{ matrix.leia-tests }}/README.md" -c 'Destroy tests' --stdin --shell bash - + - name: Run Leia Tests + uses: lando/run-leia-action@v2 + with: + leia-test: "./examples/${{ matrix.leia-tests }}/README.md" + cleanup-header: "Destroy tests" + shell: bash + stdin: true diff --git a/.github/workflows/pr-drupal8-sync-tests.yml b/.github/workflows/pr-drupal8-sync-tests.yml index 1771ea1..c251fc8 100644 --- a/.github/workflows/pr-drupal8-sync-tests.yml +++ b/.github/workflows/pr-drupal8-sync-tests.yml @@ -12,9 +12,9 @@ jobs: strategy: matrix: leia-tests: - - examples/drupal8-sync + - drupal8-sync lando-versions: - - edge + - 3-dev os: - ubuntu-22.04 node-version: @@ -31,16 +31,13 @@ jobs: cache: yarn - name: Install Yarn dependencies run: yarn install --prefer-offline --frozen-lockfile - - # This block should eventually become use lando/actions-hyperdrive@v2 - - name: Verify Docker dependencies - run: | - docker --version | grep "20.10." - docker-compose --version | grep "1.29." - - name: Grab latest edge Lando CLI - run: | - sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-${{ matrix.lando-versions }}" - sudo chmod +x /usr/local/bin/lando + - name: Setup lando ${{ matrix.lando-version }} + uses: lando/setup-lando@v2 + with: + lando-version: ${{ matrix.lando-version }} + config: | + plugins.@lando/platformsh=/home/runner/work/platformsh/platformsh + telemetry: false - name: Move in lando config appropriate for testing run: | mkdir -p ~/.lando/cache @@ -50,18 +47,10 @@ jobs: - name: Verify Lando works and we are dogfooding this plugin for tests run: | lando version - lando config --path plugins | grep platformsh | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - - # This block should eventually become use lando/actions-leia@v2 - # @NOTE? Do we want a way for our leia-action to configure apparmor since - # this might break a whole bunch of tests? or is this literally just a thing - # for the platform.sh mysql/mariadb container? - - name: Configure apparmor - run: | - set -x - sudo apt-get remove mysql-server --purge - sudo apt-get install apparmor-profiles - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - - name: Run leia tests - shell: bash - run: yarn leia "./${{ matrix.leia-tests }}/README.md" -c 'Destroy tests' --stdin --shell bash + lando config --path plugins | grep platformsh | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - name: Run Leia Tests + uses: lando/run-leia-action@v2 + with: + leia-test: "./examples/${{ matrix.leia-tests }}/README.md" + cleanup-header: "Destroy tests" + shell: bash + stdin: true diff --git a/.github/workflows/pr-mariadb-tests.yml b/.github/workflows/pr-mariadb-tests.yml index 4d20564..1931a1d 100644 --- a/.github/workflows/pr-mariadb-tests.yml +++ b/.github/workflows/pr-mariadb-tests.yml @@ -11,15 +11,15 @@ jobs: strategy: matrix: leia-tests: - - examples/mariadb-10.0 - - examples/mariadb-10.1 - - examples/mariadb-10.2 - - examples/mariadb-10.3 - - examples/mariadb-10.4 + - mariadb-10.0 + - mariadb-10.1 + - mariadb-10.2 + - mariadb-10.3 + - mariadb-10.4 # This is known to not work and uses a later image # - examples/mariadb-10.5 lando-versions: - - edge + - 3-dev os: - ubuntu-22.04 node-version: @@ -36,16 +36,13 @@ jobs: cache: yarn - name: Install Yarn dependencies run: yarn install --prefer-offline --frozen-lockfile - - # This block should eventually become use lando/actions-hyperdrive@v2 - - name: Verify Docker dependencies - run: | - docker --version | grep "20.10." - docker-compose --version | grep "1.29." - - name: Grab latest edge Lando CLI - run: | - sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-${{ matrix.lando-versions }}" - sudo chmod +x /usr/local/bin/lando + - name: Setup lando ${{ matrix.lando-version }} + uses: lando/setup-lando@v2 + with: + lando-version: ${{ matrix.lando-version }} + config: | + plugins.@lando/platformsh=/home/runner/work/platformsh/platformsh + telemetry: false - name: Move in lando config appropriate for testing run: | mkdir -p ~/.lando/cache @@ -56,20 +53,10 @@ jobs: run: | lando version lando config --path plugins | grep platformsh | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - cd ${{ matrix.leia-tests }} - lando config --path plugins | grep platformsh | grep dir | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - - # This block should eventually become use lando/actions-leia@v2 - # @NOTE? Do we want a way for our leia-action to configure apparmor since - # this might break a whole bunch of tests? or is this literally just a thing - # for the platform.sh mysql/mariadb container? - - name: Configure apparmor - run: | - set -x - sudo apt-get remove mysql-server --purge - sudo apt-get install apparmor-profiles - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - - name: Run leia tests - shell: bash - run: yarn leia "./${{ matrix.leia-tests }}/README.md" -c 'Destroy tests' --stdin --shell bash - + - name: Run Leia Tests + uses: lando/run-leia-action@v2 + with: + leia-test: "./examples/${{ matrix.leia-tests }}/README.md" + cleanup-header: "Destroy tests" + shell: bash + stdin: true diff --git a/.github/workflows/pr-memcached-tests.yml b/.github/workflows/pr-memcached-tests.yml index 8aaf36e..d3624b4 100644 --- a/.github/workflows/pr-memcached-tests.yml +++ b/.github/workflows/pr-memcached-tests.yml @@ -11,11 +11,11 @@ jobs: strategy: matrix: leia-tests: - - examples/memcached-1.6 - - examples/memcached-1.5 + - memcached-1.6 + - memcached-1.5 # - examples/memcached-1.4 lando-versions: - - edge + - 3-dev os: - ubuntu-22.04 node-version: @@ -32,16 +32,13 @@ jobs: cache: yarn - name: Install Yarn dependencies run: yarn install --prefer-offline --frozen-lockfile - - # This block should eventually become use lando/actions-hyperdrive@v2 - - name: Verify Docker dependencies - run: | - docker --version | grep "20.10." - docker-compose --version | grep "1.29." - - name: Grab latest edge Lando CLI - run: | - sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-${{ matrix.lando-versions }}" - sudo chmod +x /usr/local/bin/lando + - name: Setup lando ${{ matrix.lando-version }} + uses: lando/setup-lando@v2 + with: + lando-version: ${{ matrix.lando-version }} + config: | + plugins.@lando/platformsh=/home/runner/work/platformsh/platformsh + telemetry: false - name: Move in lando config appropriate for testing run: | mkdir -p ~/.lando/cache @@ -52,20 +49,10 @@ jobs: run: | lando version lando config --path plugins | grep platformsh | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - cd ${{ matrix.leia-tests }} - lando config --path plugins | grep platformsh | grep dir | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - - # This block should eventually become use lando/actions-leia@v2 - # @NOTE? Do we want a way for our leia-action to configure apparmor since - # this might break a whole bunch of tests? or is this literally just a thing - # for the platform.sh mysql/mariadb container? - - name: Configure apparmor - run: | - set -x - sudo apt-get remove mysql-server --purge - sudo apt-get install apparmor-profiles - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - - name: Run leia tests - shell: bash - run: yarn leia "./${{ matrix.leia-tests }}/README.md" -c 'Destroy tests' --stdin --shell bash - + - name: Run Leia Tests + uses: lando/run-leia-action@v2 + with: + leia-test: "./examples/${{ matrix.leia-tests }}/README.md" + cleanup-header: "Destroy tests" + shell: bash + stdin: true diff --git a/.github/workflows/pr-mongodb-tests.yml b/.github/workflows/pr-mongodb-tests.yml index cc04a10..8ea3196 100644 --- a/.github/workflows/pr-mongodb-tests.yml +++ b/.github/workflows/pr-mongodb-tests.yml @@ -11,12 +11,12 @@ jobs: strategy: matrix: leia-tests: - - examples/mongodb-3.6 - - examples/mongodb-3.4 - - examples/mongodb-3.2 - - examples/mongodb-3.0 + - mongodb-3.6 + - mongodb-3.4 + - mongodb-3.2 + - mongodb-3.0 lando-versions: - - edge + - 3-dev os: - ubuntu-22.04 node-version: @@ -33,16 +33,13 @@ jobs: cache: yarn - name: Install Yarn dependencies run: yarn install --prefer-offline --frozen-lockfile - - # This block should eventually become use lando/actions-hyperdrive@v2 - - name: Verify Docker dependencies - run: | - docker --version | grep "20.10." - docker-compose --version | grep "1.29." - - name: Grab latest edge Lando CLI - run: | - sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-${{ matrix.lando-versions }}" - sudo chmod +x /usr/local/bin/lando + - name: Setup lando ${{ matrix.lando-version }} + uses: lando/setup-lando@v2 + with: + lando-version: ${{ matrix.lando-version }} + config: | + plugins.@lando/platformsh=/home/runner/work/platformsh/platformsh + telemetry: false - name: Move in lando config appropriate for testing run: | mkdir -p ~/.lando/cache @@ -53,20 +50,10 @@ jobs: run: | lando version lando config --path plugins | grep platformsh | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - cd ${{ matrix.leia-tests }} - lando config --path plugins | grep platformsh | grep dir | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - - # This block should eventually become use lando/actions-leia@v2 - # @NOTE? Do we want a way for our leia-action to configure apparmor since - # this might break a whole bunch of tests? or is this literally just a thing - # for the platform.sh mysql/mariadb container? - - name: Configure apparmor - run: | - set -x - sudo apt-get remove mysql-server --purge - sudo apt-get install apparmor-profiles - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - - name: Run leia tests - shell: bash - run: yarn leia "./${{ matrix.leia-tests }}/README.md" -c 'Destroy tests' --stdin --shell bash - + - name: Run Leia Tests + uses: lando/run-leia-action@v2 + with: + leia-test: "./examples/${{ matrix.leia-tests }}/README.md" + cleanup-header: "Destroy tests" + shell: bash + stdin: true diff --git a/.github/workflows/pr-mysql-tests.yml b/.github/workflows/pr-mysql-tests.yml index 3f99e03..51e5812 100644 --- a/.github/workflows/pr-mysql-tests.yml +++ b/.github/workflows/pr-mysql-tests.yml @@ -11,13 +11,13 @@ jobs: strategy: matrix: leia-tests: - - examples/mysql-10.0 - - examples/mysql-10.1 - - examples/mysql-10.2 - - examples/mysql-10.3 - - examples/mysql-10.4 + - mysql-10.0 + - mysql-10.1 + - mysql-10.2 + - mysql-10.3 + - mysql-10.4 lando-versions: - - edge + - 3-dev os: - ubuntu-22.04 node-version: @@ -34,16 +34,13 @@ jobs: cache: yarn - name: Install Yarn dependencies run: yarn install --prefer-offline --frozen-lockfile - - # This block should eventually become use lando/actions-hyperdrive@v2 - - name: Verify Docker dependencies - run: | - docker --version | grep "20.10." - docker-compose --version | grep "1.29." - - name: Grab latest edge Lando CLI - run: | - sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-${{ matrix.lando-versions }}" - sudo chmod +x /usr/local/bin/lando + - name: Setup lando ${{ matrix.lando-version }} + uses: lando/setup-lando@v2 + with: + lando-version: ${{ matrix.lando-version }} + config: | + plugins.@lando/platformsh=/home/runner/work/platformsh/platformsh + telemetry: false - name: Move in lando config appropriate for testing run: | mkdir -p ~/.lando/cache @@ -54,20 +51,10 @@ jobs: run: | lando version lando config --path plugins | grep platformsh | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - cd ${{ matrix.leia-tests }} - lando config --path plugins | grep platformsh | grep dir | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - - # This block should eventually become use lando/actions-leia@v2 - # @NOTE? Do we want a way for our leia-action to configure apparmor since - # this might break a whole bunch of tests? or is this literally just a thing - # for the platform.sh mysql/mariadb container? - - name: Configure apparmor - run: | - set -x - sudo apt-get remove mysql-server --purge - sudo apt-get install apparmor-profiles - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - - name: Run leia tests - shell: bash - run: yarn leia "./${{ matrix.leia-tests }}/README.md" -c 'Destroy tests' --stdin --shell bash - + - name: Run Leia Tests + uses: lando/run-leia-action@v2 + with: + leia-test: "./examples/${{ matrix.leia-tests }}/README.md" + cleanup-header: "Destroy tests" + shell: bash + stdin: true diff --git a/.github/workflows/pr-php-tests.yml b/.github/workflows/pr-php-tests.yml index 7257a57..c20d2d9 100644 --- a/.github/workflows/pr-php-tests.yml +++ b/.github/workflows/pr-php-tests.yml @@ -11,17 +11,17 @@ jobs: strategy: matrix: leia-tests: - - examples/php-8.0 - - examples/php-7.4 - - examples/php-7.3 - - examples/php-7.2 - - examples/php-7.1 - - examples/php-7.0 - - examples/php-5.6 - - examples/php-5.5 - # - examples/php-5.4 + - php-8.0 + - php-7.4 + - php-7.3 + - php-7.2 + - php-7.1 + - php-7.0 + - php-5.6 + - php-5.5 + # - php-5.4 lando-versions: - - edge + - 3-dev os: - ubuntu-22.04 node-version: @@ -38,16 +38,13 @@ jobs: cache: yarn - name: Install Yarn dependencies run: yarn install --prefer-offline --frozen-lockfile - - # This block should eventually become use lando/actions-hyperdrive@v2 - - name: Verify Docker dependencies - run: | - docker --version | grep "20.10." - docker-compose --version | grep "1.29." - - name: Grab latest edge Lando CLI - run: | - sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-${{ matrix.lando-versions }}" - sudo chmod +x /usr/local/bin/lando + - name: Setup lando ${{ matrix.lando-version }} + uses: lando/setup-lando@v2 + with: + lando-version: ${{ matrix.lando-version }} + config: | + plugins.@lando/platformsh=/home/runner/work/platformsh/platformsh + telemetry: false - name: Move in lando config appropriate for testing run: | mkdir -p ~/.lando/cache @@ -58,20 +55,10 @@ jobs: run: | lando version lando config --path plugins | grep platformsh | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - cd ${{ matrix.leia-tests }} - lando config --path plugins | grep platformsh | grep dir | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - - # This block should eventually become use lando/actions-leia@v2 - # @NOTE? Do we want a way for our leia-action to configure apparmor since - # this might break a whole bunch of tests? or is this literally just a thing - # for the platform.sh mysql/mariadb container? - - name: Configure apparmor - run: | - set -x - sudo apt-get remove mysql-server --purge - sudo apt-get install apparmor-profiles - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - - name: Run leia tests - shell: bash - run: yarn leia "./${{ matrix.leia-tests }}/README.md" -c 'Destroy tests' --stdin --shell bash - + - name: Run Leia Tests + uses: lando/run-leia-action@v2 + with: + leia-test: "./examples/${{ matrix.leia-tests }}/README.md" + cleanup-header: "Destroy tests" + shell: bash + stdin: true diff --git a/.github/workflows/pr-postgresql-tests.yml b/.github/workflows/pr-postgresql-tests.yml index 4774c32..0e178bc 100644 --- a/.github/workflows/pr-postgresql-tests.yml +++ b/.github/workflows/pr-postgresql-tests.yml @@ -11,14 +11,14 @@ jobs: strategy: matrix: leia-tests: - - examples/postgresql-9.3 - - examples/postgresql-9.6 - - examples/postgresql-10 - - examples/postgresql-11 - - examples/postgresql-12 - - examples/postgresql-13 + - postgresql-9.3 + - postgresql-9.6 + - postgresql-10 + - postgresql-11 + - postgresql-12 + - postgresql-13 lando-versions: - - edge + - 3-dev os: - ubuntu-22.04 node-version: @@ -35,16 +35,13 @@ jobs: cache: yarn - name: Install Yarn dependencies run: yarn install --prefer-offline --frozen-lockfile - - # This block should eventually become use lando/actions-hyperdrive@v2 - - name: Verify Docker dependencies - run: | - docker --version | grep "20.10." - docker-compose --version | grep "1.29." - - name: Grab latest edge Lando CLI - run: | - sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-${{ matrix.lando-versions }}" - sudo chmod +x /usr/local/bin/lando + - name: Setup lando ${{ matrix.lando-version }} + uses: lando/setup-lando@v2 + with: + lando-version: ${{ matrix.lando-version }} + config: | + plugins.@lando/platformsh=/home/runner/work/platformsh/platformsh + telemetry: false - name: Move in lando config appropriate for testing run: | mkdir -p ~/.lando/cache @@ -55,20 +52,10 @@ jobs: run: | lando version lando config --path plugins | grep platformsh | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - cd ${{ matrix.leia-tests }} - lando config --path plugins | grep platformsh | grep dir | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - - # This block should eventually become use lando/actions-leia@v2 - # @NOTE? Do we want a way for our leia-action to configure apparmor since - # this might break a whole bunch of tests? or is this literally just a thing - # for the platform.sh mysql/mariadb container? - - name: Configure apparmor - run: | - set -x - sudo apt-get remove mysql-server --purge - sudo apt-get install apparmor-profiles - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - - name: Run leia tests - shell: bash - run: yarn leia "./${{ matrix.leia-tests }}/README.md" -c 'Destroy tests' --stdin --shell bash - + - name: Run Leia Tests + uses: lando/run-leia-action@v2 + with: + leia-test: "./examples/${{ matrix.leia-tests }}/README.md" + cleanup-header: "Destroy tests" + shell: bash + stdin: true diff --git a/.github/workflows/pr-redis-tests.yml b/.github/workflows/pr-redis-tests.yml index 00c3b21..979b157 100644 --- a/.github/workflows/pr-redis-tests.yml +++ b/.github/workflows/pr-redis-tests.yml @@ -11,14 +11,14 @@ jobs: strategy: matrix: leia-tests: - - examples/redis-6.0 - - examples/redis-5.0 - - examples/redis-4.0 - - examples/redis-3.2 - - examples/redis-3.0 - - examples/redis-2.8 + - redis-6.0 + - redis-5.0 + - redis-4.0 + - redis-3.2 + - redis-3.0 + - redis-2.8 lando-versions: - - edge + - 3-dev os: - ubuntu-22.04 node-version: @@ -35,16 +35,13 @@ jobs: cache: yarn - name: Install Yarn dependencies run: yarn install --prefer-offline --frozen-lockfile - - # This block should eventually become use lando/actions-hyperdrive@v2 - - name: Verify Docker dependencies - run: | - docker --version | grep "20.10." - docker-compose --version | grep "1.29." - - name: Grab latest edge Lando CLI - run: | - sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-${{ matrix.lando-versions }}" - sudo chmod +x /usr/local/bin/lando + - name: Setup lando ${{ matrix.lando-version }} + uses: lando/setup-lando@v2 + with: + lando-version: ${{ matrix.lando-version }} + config: | + plugins.@lando/platformsh=/home/runner/work/platformsh/platformsh + telemetry: false - name: Move in lando config appropriate for testing run: | mkdir -p ~/.lando/cache @@ -55,20 +52,10 @@ jobs: run: | lando version lando config --path plugins | grep platformsh | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - cd ${{ matrix.leia-tests }} - lando config --path plugins | grep platformsh | grep dir | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - - # This block should eventually become use lando/actions-leia@v2 - # @NOTE? Do we want a way for our leia-action to configure apparmor since - # this might break a whole bunch of tests? or is this literally just a thing - # for the platform.sh mysql/mariadb container? - - name: Configure apparmor - run: | - set -x - sudo apt-get remove mysql-server --purge - sudo apt-get install apparmor-profiles - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - - name: Run leia tests - shell: bash - run: yarn leia "./${{ matrix.leia-tests }}/README.md" -c 'Destroy tests' --stdin --shell bash - + - name: Run Leia Tests + uses: lando/run-leia-action@v2 + with: + leia-test: "./examples/${{ matrix.leia-tests }}/README.md" + cleanup-header: "Destroy tests" + shell: bash + stdin: true diff --git a/.github/workflows/pr-solr-tests.yml b/.github/workflows/pr-solr-tests.yml index d313c22..afd58c1 100644 --- a/.github/workflows/pr-solr-tests.yml +++ b/.github/workflows/pr-solr-tests.yml @@ -11,18 +11,18 @@ jobs: strategy: matrix: leia-tests: - - examples/solr-8.6 - - examples/solr-8.4 - - examples/solr-8.0 - - examples/solr-7.7 - - examples/solr-7.6 - - examples/solr-6.6 - - examples/solr-6.3 - - examples/solr-4.10 - - examples/solr-3.6 + - solr-8.6 + - solr-8.4 + - solr-8.0 + - solr-7.7 + - solr-7.6 + - solr-6.6 + - solr-6.3 + - solr-4.10 + - solr-3.6 lando-versions: - - edge + - 3-dev os: - ubuntu-22.04 node-version: @@ -39,16 +39,13 @@ jobs: cache: yarn - name: Install Yarn dependencies run: yarn install --prefer-offline --frozen-lockfile - - # This block should eventually become use lando/actions-hyperdrive@v2 - - name: Verify Docker dependencies - run: | - docker --version | grep "20.10." - docker-compose --version | grep "1.29." - - name: Grab latest edge Lando CLI - run: | - sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-${{ matrix.lando-versions }}" - sudo chmod +x /usr/local/bin/lando + - name: Setup lando ${{ matrix.lando-version }} + uses: lando/setup-lando@v2 + with: + lando-version: ${{ matrix.lando-version }} + config: | + plugins.@lando/platformsh=/home/runner/work/platformsh/platformsh + telemetry: false - name: Move in lando config appropriate for testing run: | mkdir -p ~/.lando/cache @@ -59,20 +56,10 @@ jobs: run: | lando version lando config --path plugins | grep platformsh | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - cd ${{ matrix.leia-tests }} - lando config --path plugins | grep platformsh | grep dir | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - - # This block should eventually become use lando/actions-leia@v2 - # @NOTE? Do we want a way for our leia-action to configure apparmor since - # this might break a whole bunch of tests? or is this literally just a thing - # for the platform.sh mysql/mariadb container? - - name: Configure apparmor - run: | - set -x - sudo apt-get remove mysql-server --purge - sudo apt-get install apparmor-profiles - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - - name: Run leia tests - shell: bash - run: yarn leia "./${{ matrix.leia-tests }}/README.md" -c 'Destroy tests' --stdin --shell bash - + - name: Run Leia Tests + uses: lando/run-leia-action@v2 + with: + leia-test: "./examples/${{ matrix.leia-tests }}/README.md" + cleanup-header: "Destroy tests" + shell: bash + stdin: true diff --git a/.github/workflows/pr-varnish-tests.yml b/.github/workflows/pr-varnish-tests.yml index ddd3bb2..b3eb313 100644 --- a/.github/workflows/pr-varnish-tests.yml +++ b/.github/workflows/pr-varnish-tests.yml @@ -11,14 +11,14 @@ jobs: strategy: matrix: leia-tests: - - examples/varnish-6.3 - - examples/varnish-6.0 - - examples/varnish-5.2 + - varnish-6.3 + - varnish-6.0 + - varnish-5.2 # @NOTE: the varnish 5.1 image is actually the varnish 5.2 image as well - # - examples/varnish-5.1 + # - varnish-5.1 lando-versions: - - edge + - 3-dev os: - ubuntu-22.04 node-version: @@ -35,16 +35,13 @@ jobs: cache: yarn - name: Install Yarn dependencies run: yarn install --prefer-offline --frozen-lockfile - - # This block should eventually become use lando/actions-hyperdrive@v2 - - name: Verify Docker dependencies - run: | - docker --version | grep "20.10." - docker-compose --version | grep "1.29." - - name: Grab latest edge Lando CLI - run: | - sudo curl -fsSL -o /usr/local/bin/lando "https://files.lando.dev/cli/lando-linux-x64-${{ matrix.lando-versions }}" - sudo chmod +x /usr/local/bin/lando + - name: Setup lando ${{ matrix.lando-version }} + uses: lando/setup-lando@v2 + with: + lando-version: ${{ matrix.lando-version }} + config: | + plugins.@lando/platformsh=/home/runner/work/platformsh/platformsh + telemetry: false - name: Move in lando config appropriate for testing run: | mkdir -p ~/.lando/cache @@ -55,20 +52,10 @@ jobs: run: | lando version lando config --path plugins | grep platformsh | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - cd ${{ matrix.leia-tests }} - lando config --path plugins | grep platformsh | grep dir | grep /home/runner/work/platformsh/platformsh || (echo "::error:: Not dogfooding this plugin correctly!" && exit 1) - - # This block should eventually become use lando/actions-leia@v2 - # @NOTE? Do we want a way for our leia-action to configure apparmor since - # this might break a whole bunch of tests? or is this literally just a thing - # for the platform.sh mysql/mariadb container? - - name: Configure apparmor - run: | - set -x - sudo apt-get remove mysql-server --purge - sudo apt-get install apparmor-profiles - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - - name: Run leia tests - shell: bash - run: yarn leia "./${{ matrix.leia-tests }}/README.md" -c 'Destroy tests' --stdin --shell bash - + - name: Run Leia Tests + uses: lando/run-leia-action@v2 + with: + leia-test: "./examples/${{ matrix.leia-tests }}/README.md" + cleanup-header: "Destroy tests" + shell: bash + stdin: true diff --git a/CHANGELOG.md b/CHANGELOG.md index d110824..b772928 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v0.10.0 - [October 5, 2023](https://github.com/lando/platformsh/releases/tag/v0.10.0) +* Added a "wait for user" script to ensure user is loaded before cloning repo. [lando/core#71](https://github.com/lando/core/pull/71) + ## v0.9.0 - [July 3, 2023](https://github.com/lando/platformsh/releases/tag/v0.9.0) * Removed bundle-dependencies and version-bump-prompt from plugin. * Updated package to use prepare-release-action. diff --git a/package.json b/package.json index 4f37ab8..9d3b273 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "tar": "^6.1.11" }, "devDependencies": { - "@lando/leia": "^0.6.4", + "@lando/leia": "^1.0.0-beta.1", "@lando/vuepress-theme-default-plus": "1.0.0-beta.49", "chai": "^4.3.4", "command-line-test": "^1.0.10", diff --git a/recipes/platformsh/init.js b/recipes/platformsh/init.js index 10e630b..b1bcbb6 100644 --- a/recipes/platformsh/init.js +++ b/recipes/platformsh/init.js @@ -143,6 +143,7 @@ module.exports = { })); }}, {name: 'reload-keys', cmd: '/helpers/load-keys.sh --silent', user: 'root'}, + {name: 'wait-for-user', cmd: '/helpers/psh-wait-for-user.sh'}, { name: 'clone-repo', cmd: options => `/helpers/psh-clone.sh ${options['url']} ${options['ssh']} ${options['token']}`, diff --git a/scripts/psh-wait-for-user.sh b/scripts/psh-wait-for-user.sh new file mode 100644 index 0000000..750b4aa --- /dev/null +++ b/scripts/psh-wait-for-user.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e + +# user info +user="${1:-$LANDO_WEBROOT_USER}" +id="${2:-$LANDO_HOST_UID}" + +# retry settings +attempt=0 +delay=1 +retry=5 + +until [ "$attempt" -ge "$retry" ] +do + id "$user"| grep uid | grep "$id" &>/dev/null && break + attempt=$((attempt+1)) + sleep "$delay" +done diff --git a/yarn.lock b/yarn.lock index d65bc45..27417a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -442,10 +442,10 @@ resolved "https://registry.yarnpkg.com/@lando/argv/-/argv-1.1.0.tgz#96ba39e6a0498995c7abbbaff1794d71f827cd78" integrity sha512-nBM6Rk1XorQdxad0CJTxDaNKrj+ITUg3u9rZYrOiF1KI5oImBJRBKjwf1EhnktJ63HmLGTq+sZQsR8veJmf1GQ== -"@lando/leia@^0.6.4": - version "0.6.4" - resolved "https://registry.yarnpkg.com/@lando/leia/-/leia-0.6.4.tgz#246149798f00bb50530f300b16c5d8718a6b134b" - integrity sha512-lSFJftURdfGrz+an77sGNi7gC8VnsxY0H9a/HX5X71lRqlsAL14x1rDQfrHb6kHSbI3621cEvw+22blTo3ol3A== +"@lando/leia@^1.0.0-beta.1": + version "1.0.0-beta.1" + resolved "https://registry.yarnpkg.com/@lando/leia/-/leia-1.0.0-beta.1.tgz#11998e0b7a914d448fc90249ee1baf99770970e9" + integrity sha512-uw+wyQPFN0QccligeFzZ5S7uMmsy9mzJN9myD/woK91gYvRvtCyeYXGSQb9tPWC+VpnO3YSg2Q0erAZ2qvazEA== dependencies: "@lando/argv" "^1.0.6" "@oclif/command" "^1.8.0" @@ -461,7 +461,7 @@ fs-extra "^7.0.1" glob "^7.1.3" lodash "^4.17.11" - marked "^0.7.0" + marked "^4.0.10" mocha "^5.2.0" object-hash "^2.2.0" @@ -3142,10 +3142,10 @@ markdown-it@^13.0.1: mdurl "^1.0.1" uc.micro "^1.0.5" -marked@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.7.0.tgz#b64201f051d271b1edc10a04d1ae9b74bb8e5c0e" - integrity sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg== +marked@^4.0.10: + version "4.3.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" + integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== md5-hex@^4.0.0: version "4.0.0"