Skip to content

fix(compose): Fix compose file path resolution as it is copied into the lando config directory #35

fix(compose): Fix compose file path resolution as it is copied into the lando config directory

fix(compose): Fix compose file path resolution as it is copied into the lando config directory #35

name: PR Release Tests
on:
pull_request:
jobs:
package:
runs-on: ${{ matrix.runner }}
env:
TERM: xterm
strategy:
fail-fast: false
matrix:
runner:
- macos-14
- ubuntu-24.04
node-version:
- '20'
os:
- linux
- macos
- win
type:
- '-slim'
- ''
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm clean-install --prefer-offline --frozen-lockfile --production
- name: Install fatcore
if: matrix.type != '-slim'
run: scripts/fatcore-install.sh
- name: Prepare Release
uses: lando/prepare-release-action@v3
with:
version: dev
sync: false
- name: Package into node binary
uses: lando/pkg-action@v5
with:
entrypoint: bin/lando
node-version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
options: --options dns-result-order=ipv4first
pkg: "@yao-pkg/[email protected]"
upload-key: "lando-${{ matrix.os }}-${{ matrix.runner == 'macos-14' && 'arm64' || 'x64' }}${{ matrix.type }}-${{ github.sha }}"
- name: Ensure version
if: (matrix.os == 'linux' && runner.os == 'Linux') || (matrix.os == 'macos' && runner.os == 'macOS')
run: ./dist/@lando/core version --all
- name: Ensure ipv4first
if: (matrix.os == 'linux' && runner.os == 'Linux') || (matrix.os == 'macos' && runner.os == 'macOS')
run: ./dist/@lando/core config --path cli.args | grep dns-result-order=ipv4first
- name: Ensure stable channel
if: (matrix.os == 'linux' && runner.os == 'Linux') || (matrix.os == 'macos' && runner.os == 'macOS')
run: ./dist/@lando/core config --path channel | grep stable
- name: Ensure slimcore
if: ((matrix.os == 'linux' && runner.os == 'Linux') || (matrix.os == 'macos' && runner.os == 'macOS')) && matrix.type == '-slim'
run: ./dist/@lando/core config --path fatcore | grep false
- name: Ensure fatcore
if: ((matrix.os == 'linux' && runner.os == 'Linux') || (matrix.os == 'macos' && runner.os == 'macOS')) && matrix.type == ''
run: |
./dist/@lando/core config --path fatcore | grep true
./dist/@lando/core config | grep -q "node_modules/@lando/wordpress"
release:
runs-on: ${{ matrix.os }}
needs:
- package
env:
TERM: xterm
strategy:
matrix:
os:
- ubuntu-24.04
node-version:
- '20'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: dist
- name: Verify artifacts
run: |
./scripts/generate-checksums.sh --directory dist --depth 2 --show
cat checksums.txt | grep "$(sha256sum dist/lando-linux-x64-slim-${{ github.sha }}/core)"
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
cache: npm
- name: Install dependencies
run: npm clean-install --prefer-offline --frozen-lockfile
- name: Lint code
run: npm run lint
- name: Run unit tests
run: npm run test:unit
- name: Prepare Release
uses: lando/prepare-release-action@v3
with:
version: dev
sync: false
lando-plugin: true
- name: Publish to npm dryrun
run: npm publish --access public --dry-run