-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve lando shellenv to produce more consistent newliney output (#255)
* improve lando shellenv to produce more consistent newliney output * rework FATCORE edging to accomodate deprecated plugins * consolidate devops further for checksumming * consolidate devops further for checksumming part 2 * consolidate devops further for checksumming part 3 * consolidate devops further for checksumming part 4 * PEMDAS * PEMDAS2 * checksum debugging * checksum debugging part 2 * checksum debugging part 3 * checksum debugging part 4 * checksum debugging part 5 * checksum debugging part 6 * checksum debugging part 7 * checksum debugging part 8
- Loading branch information
Showing
14 changed files
with
305 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Create Dev CLI Releases | ||
name: Create Dev Releases | ||
|
||
on: | ||
push: | ||
|
@@ -14,15 +14,17 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
runner: | ||
- macos-14 | ||
- ubuntu-24.04 | ||
node-version: | ||
- '20' | ||
os: | ||
- linux | ||
- macos | ||
- win | ||
runner: | ||
- macos-14 | ||
- ubuntu-24.04 | ||
type: | ||
- '-slim' | ||
|
||
steps: | ||
- name: Checkout code | ||
|
@@ -37,16 +39,17 @@ jobs: | |
- name: Install dependencies | ||
run: npm clean-install --prefer-offline --frozen-lockfile --production | ||
- name: Install fatcore | ||
run: scripts/fatcore-install.sh | ||
if: matrix.type != '-slim' | ||
run: scripts/fatcore-install.sh --edge | ||
- name: Switch to edge channel | ||
run: | | ||
sed -i.bak "s/^channel: stable/channel: edge/" config.yml | ||
rm -rf config.yml.bak | ||
- name: Prepare Release | ||
uses: lando/prepare-release-action@v3 | ||
with: | ||
version: dev | ||
sync: false | ||
- name: Ensure version | ||
run: node ./bin/lando version | ||
- name: Ensure plugins installed | ||
run: node ./bin/lando config | grep -q "node_modules/@lando/wordpress" | ||
- name: Package into node binary | ||
uses: lando/pkg-action@v5 | ||
with: | ||
|
@@ -55,15 +58,23 @@ jobs: | |
os: ${{ matrix.os }} | ||
options: --options dns-result-order=ipv4first | ||
pkg: "@yao-pkg/[email protected]" | ||
- name: Ensure fatcore | ||
if: matrix.os == 'linux' && runner.os == 'Linux' && runner.arch == 'X64' | ||
run: ./dist/@lando/core config --path fatcore | grep true | ||
- 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' && runner.arch == 'X64' | ||
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 edge channel | ||
# if: matrix.os == 'linux' && runner.os == 'Linux' && runner.arch == 'X64' | ||
# run: ./dist/@lando/core config --path channel | grep edge | ||
- name: Ensure edge channel | ||
if: (matrix.os == 'linux' && runner.os == 'Linux') || (matrix.os == 'macos' && runner.os == 'macOS') | ||
run: ./dist/@lando/core config --path channel | grep edge | ||
- 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 != '-slim' | ||
run: | ||
./dist/@lando/core config --path fatcore | grep true | ||
./dist/@lando/core config | grep -q "node_modules/@lando/wordpress" | ||
|
||
sign-n-deploy: | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -148,12 +159,20 @@ jobs: | |
- name: Rename as needed | ||
shell: bash | ||
run: | | ||
# create aliases | ||
mkdir -p releases | ||
cp ${{ steps.code-sign-action.outputs.file }} releases/${{ matrix.result }} | ||
cp releases/${{ matrix.result }} "releases/$(echo ${{ matrix.result }} | sed 's/${{ github.ref_name }}/latest/;')" | ||
cp releases/${{ matrix.result }} "releases/$(echo ${{ matrix.result }} | sed 's/${{ github.ref_name }}/dev/;')" | ||
chmod +x releases/* | ||
ls -lsa releases | ||
# create checksums | ||
./scripts/generate-checksums.sh --directory releases --output checksums-dev.txt --depth 2 | ||
# cat the data | ||
cat checksums-dev.txt | ||
# move the checksums so it is uploaded as well | ||
cp checksums-dev.txt releases/checksums-dev.txt | ||
- name: Configure S3 Credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.