Skip to content

Commit

Permalink
Update fully to npm.
Browse files Browse the repository at this point in the history
  • Loading branch information
reynoldsalec committed Feb 10, 2024
1 parent 4d3378d commit cc68dcf
Show file tree
Hide file tree
Showing 18 changed files with 369 additions and 5,510 deletions.
73 changes: 29 additions & 44 deletions .github/workflows/pr-basic-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ on:
pull_request:

jobs:
leia-tests:
leia-test:
runs-on: ${{ matrix.os }}
env:
TERM: xterm
strategy:
matrix:
leia-tests:
leia-test:
- examples/basics
lando-versions:
- edge
lando-version:
- 3-dev-slim
os:
- ubuntu-22.04
node-version:
- '16'
- '18'

steps:
# Install deps and cache
Expand All @@ -27,43 +27,28 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
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: 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
- 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)
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
cache: npm
- name: Install NPM dependencies
run: npm clean-install --prefer-offline --frozen-lockfile

- name: Bundle Deps
uses: lando/prepare-release-action@v3
with:
lando-plugin: true
version: dev
sync: false
- name: Setup lando ${{ matrix.lando-version }}
uses: lando/setup-lando@v2
with:
lando-version: ${{ matrix.lando-version }}
config: |
setup.skipCommonPlugins=true
setup.plugins.@lando/platformsh=/home/runner/work/platformsh/platformsh
telemetry: false
- name: Run Leia Tests
uses: lando/run-leia-action@v2
with:
leia-test: "./${{ matrix.leia-test }}/README.md"
cleanup-header: "Destroy tests"
shell: bash
stdin: true
73 changes: 29 additions & 44 deletions .github/workflows/pr-chrome-headless-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ on:
pull_request:

jobs:
leia-tests:
leia-test:
runs-on: ${{ matrix.os }}
env:
TERM: xterm
strategy:
matrix:
leia-tests:
leia-test:
- examples/chrome-headless-73
lando-versions:
- edge
lando-version:
- 3-dev-slim
os:
- ubuntu-22.04
node-version:
- '16'
- '18'

steps:
# Install deps and cache
Expand All @@ -27,43 +27,28 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
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: 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
- 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)
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
cache: npm
- name: Install NPM dependencies
run: npm clean-install --prefer-offline --frozen-lockfile

- name: Bundle Deps
uses: lando/prepare-release-action@v3
with:
lando-plugin: true
version: dev
sync: false
- name: Setup lando ${{ matrix.lando-version }}
uses: lando/setup-lando@v2
with:
lando-version: ${{ matrix.lando-version }}
config: |
setup.skipCommonPlugins=true
setup.plugins.@lando/platformsh=/home/runner/work/platformsh/platformsh
telemetry: false
- name: Run Leia Tests
uses: lando/run-leia-action@v2
with:
leia-test: "./${{ matrix.leia-test }}/README.md"
cleanup-header: "Destroy tests"
shell: bash
stdin: true
71 changes: 29 additions & 42 deletions .github/workflows/pr-drupal8-sync-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ on:
pull_request:

jobs:
leia-tests:
leia-test:
runs-on: ${{ matrix.os }}
env:
TERM: xterm
PLATFORMSH_CLI_TOKEN: ${{ secrets.PLATFORMSH_CLI_TOKEN }}
strategy:
matrix:
leia-tests:
leia-test:
- examples/drupal8-sync
lando-versions:
- edge
lando-version:
- 3-dev-slim
os:
- ubuntu-22.04
node-version:
- '16'
- '18'

steps:
# Install deps and cache
Expand All @@ -28,40 +28,27 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
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: 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
- 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
cache: npm
- name: Install NPM dependencies
run: npm clean-install --prefer-offline --frozen-lockfile
- name: Bundle Deps
uses: lando/prepare-release-action@v3
with:
lando-plugin: true
version: dev
sync: false
- name: Setup lando ${{ matrix.lando-version }}
uses: lando/setup-lando@v2
with:
lando-version: ${{ matrix.lando-version }}
config: |
setup.skipCommonPlugins=true
setup.plugins.@lando/platformsh=/home/runner/work/platformsh/platformsh
telemetry: false
- name: Run Leia Tests
uses: lando/run-leia-action@v2
with:
leia-test: "./${{ matrix.leia-test }}/README.md"
cleanup-header: "Destroy tests"
shell: bash
stdin: true
10 changes: 5 additions & 5 deletions .github/workflows/pr-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
os:
- ubuntu-22.04
node-version:
- '16'
- '18'
steps:
# Install deps and cache
- name: Checkout code
Expand All @@ -20,10 +20,10 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install Yarn dependencies
run: yarn install --prefer-offline --frozen-lockfile
cache: npm
- name: Install NPM dependencies
run: npm clean-install --prefer-offline --frozen-lockfile

# Run the linter
- name: Run code linter
run: yarn lint
run: npm run lint
Loading

0 comments on commit cc68dcf

Please sign in to comment.