diff --git a/.github/workflows/pr-drupal-example-simple-tests.yml b/.github/workflows/pr-drupal-example-simple-tests.yml index cbc8507..5a5e825 100644 --- a/.github/workflows/pr-drupal-example-simple-tests.yml +++ b/.github/workflows/pr-drupal-example-simple-tests.yml @@ -21,13 +21,23 @@ jobs: steps: # Install deps and cache + # Eventually it would be great if these steps could live in a separate YAML file + # that could be included in line to avoid code duplication - name: Checkout code uses: actions/checkout@v2 - name: Install node ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - cache: yarn + - name: Get Yarn cache directory + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - name: Use Yarn cache + uses: actions/cache@v2 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-v3-${{ hashFiles('**/yarn.lock') }} - name: Install Yarn dependencies run: yarn install --prefer-offline --frozen-lockfile @@ -36,21 +46,30 @@ jobs: 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: Move in lando config appropriate for testing run: | mkdir -p ~/.lando/cache cp -f actions-lando-config.yml ~/.lando/config.yml echo false > ~/.lando/cache/report_errors - lando --clear + # This part here is cloning a second repository + - name: Checkout Lando CLI from GitHub + uses: actions/checkout@v2 + with: + repository: lando/cli + path: cli + ref: main + - name: Install Lando from GitHub Source + run: | + cd cli + yarn install --prefer-offline --frozen-lockfile + yarn build:cli + sudo mv ./dist/@lando/cli /usr/local/bin/lando + sudo chmod +x /usr/local/bin/lando - name: Verify Lando works and we are dogfooding this plugin for tests run: | + lando --clear lando version lando config --path plugins | grep lagoon | grep /home/runner/work/lagoon/lagoon || echo "::error:: Not dogfooding this plugin correctly! " - # 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 diff --git a/lib/services.js b/lib/services.js index 4495f42..24c54b4 100644 --- a/lib/services.js +++ b/lib/services.js @@ -101,7 +101,7 @@ exports.getLandoAuxServices = (services = {}, config) => { services.lagooncli = { type: 'compose', services: { - image: 'amazeeio/lagoon-cli', + image: 'uselagoon/lagoon-cli', command: 'tail -f /dev/null', volumes: [ `${config.home}:/root`,