Skip to content

chore(deps): update dependency @biomejs/biome to v2.4.12 (#738) #2014

chore(deps): update dependency @biomejs/biome to v2.4.12 (#738)

chore(deps): update dependency @biomejs/biome to v2.4.12 (#738) #2014

Workflow file for this run

name: Pull Request
on:
push:
branches: [main]
workflow_dispatch:
pull_request:
jobs:
can-read-secret:
name: Can Read Secret
runs-on: ubuntu-latest
outputs:
secret-set: ${{ steps.check-secret.outputs.secret-set }}
steps:
- name: Check secret
id: check-secret
run: |
if [ -z "${{ secrets.TEST_ACCESS_TOKEN }}" ]; then
echo "secret-set=false" >> "$GITHUB_OUTPUT"
else
echo "secret-set=true" >> "$GITHUB_OUTPUT"
fi
build-ui:
name: User Interface Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: setup Node
uses: actions/setup-node@v6
with:
node-version: "latest"
- name: install dependencies
working-directory: ./desktop
run: yarn install --frozen-lockfile
- name: lint
working-directory: ./desktop
run: yarn lint:ci
- name: format
working-directory: ./desktop
run: yarn format:check
- name: type check
working-directory: ./desktop
run: yarn types:check
- name: build
working-directory: ./desktop
run: yarn build
build-cli:
name: Build CLI Binary on ${{ matrix.runner }}
strategy:
matrix:
include:
- runner: ubuntu-22.04
- runner: macos-latest
- runner: windows-latest
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: get operating system lowercase
id: os
shell: bash
run: |
OS=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')
if [ "$OS" == "macos" ]; then
OS="darwin"
fi
echo "runner_os=$OS" >> "$GITHUB_OUTPUT"
- uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: "~> v2"
args: build --id devpod-${{ steps.os.outputs.runner_os }} --snapshot
env:
DEVPOD_CLI_VERSION: v0.0.0
- uses: actions/upload-artifact@v7
with:
name: devpod-${{ steps.os.outputs.runner_os }}
path: dist/devpod-${{ steps.os.outputs.runner_os }}_*/devpod-${{ steps.os.outputs.runner_os }}-*
integration-tests:
name: Test ${{ matrix.label }} on ${{ matrix.runner }}
needs: [can-read-secret, build-cli]
strategy:
fail-fast: false
matrix:
include:
- label: context
runner: ubuntu-latest
free-disk-space: false
install-kind: false
requires-secret: false
- label: ide
runner: ubuntu-latest
free-disk-space: false
install-kind: false
requires-secret: false
- label: integration
runner: ubuntu-latest
free-disk-space: false
install-kind: false
requires-secret: false
- label: machine
runner: ubuntu-latest
free-disk-space: false
install-kind: false
requires-secret: false
- label: machineprovider
runner: ubuntu-latest
free-disk-space: false
install-kind: false
requires-secret: false
- label: provider
runner: ubuntu-latest
free-disk-space: false
install-kind: true
requires-secret: false
- label: ssh
runner: ubuntu-latest
free-disk-space: false
install-kind: false
requires-secret: false
- label: build
runner: ubuntu-latest
free-disk-space: true
install-kind: true
requires-secret: true
- label: docker-install
runner: ubuntu-latest
free-disk-space: false
install-kind: false
requires-secret: false
# Up tests
- label: up-workspaces
runner: ubuntu-latest
free-disk-space: true
install-kind: true
requires-secret: false
- label: up-git-repositories
runner: ubuntu-latest
free-disk-space: true
install-kind: true
requires-secret: false
- label: up-handle-errors
runner: ubuntu-latest
free-disk-space: true
install-kind: true
requires-secret: false
- label: up-private-token
runner: ubuntu-latest
free-disk-space: false
install-kind: false
requires-secret: true
- label: up-provider-kubernetes
runner: ubuntu-latest
free-disk-space: true
install-kind: true
requires-secret: false
- label: up-provider-podman
runner: ubuntu-latest
free-disk-space: true
install-kind: true
requires-secret: false
- label: up-provider-docker
runner: ubuntu-latest
free-disk-space: false
install-kind: true
requires-secret: false
- label: up-dockerfile-build
runner: ubuntu-latest
free-disk-space: false
install-kind: true
requires-secret: false
# Up Docker Compose tests
- label: up-docker-compose && build
runner: ubuntu-latest
free-disk-space: false
install-kind: true
requires-secret: false
- label: up-docker-compose && config
runner: ubuntu-latest
free-disk-space: false
install-kind: true
requires-secret: false
- label: up-docker-compose && suite
runner: ubuntu-latest
free-disk-space: false
install-kind: true
requires-secret: false
# Up Docker Feature tests
- label: up-features && suite
runner: ubuntu-latest
free-disk-space: true
install-kind: true
requires-secret: false
# Upgrade tests
- label: upgrade
runner: ubuntu-latest
free-disk-space: false
install-kind: false
requires-secret: false
# Windows tests
- label: context
runner: windows-latest
free-disk-space: false
install-kind: false
requires-secret: false
- label: provider
runner: windows-latest
free-disk-space: false
install-kind: true
requires-secret: false
- label: up-docker-wsl
runner: windows-latest
free-disk-space: false
install-kind: true
requires-secret: false
runs-on: ${{ matrix.runner }}
steps:
- uses: jlumbroso/free-disk-space@v1.3.1
if: matrix.free-disk-space == true && runner.os == 'Linux' && (matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true')
- uses: actions/checkout@v6
if: matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true'
- name: setup Go
if: matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true'
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: get operating system lowercase
if: matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true'
id: os
shell: bash
run: |
OS=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')
if [ "$OS" == "macos" ]; then
OS="darwin"
fi
echo "runner_os=$OS" >> "$GITHUB_OUTPUT"
- name: download CLI artifacts
if: matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true'
uses: actions/download-artifact@v8
with:
pattern: devpod-${{ steps.os.outputs.runner_os }}
path: ${{ runner.temp }}/devpod-bin/
merge-multiple: true
- name: download Linux CLI artifacts for Windows
if: runner.os == 'Windows' && (matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true')
uses: actions/download-artifact@v8
with:
pattern: devpod-linux
path: ${{ runner.temp }}/devpod-bin/
merge-multiple: true
# e2e expects executable to have name defined in e2e/framework/framework.go
- name: setup executable
if: matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true'
shell: bash
working-directory: ./e2e
run: |
TEMP_DIR="${{ runner.temp }}"
if [ "${{ runner.os }}" == "Windows" ]; then
TEMP_DIR="${TEMP_DIR//\\//}"
fi
ls -R "$TEMP_DIR/devpod-bin/"
mkdir -p ./bin/
find "$TEMP_DIR/devpod-bin/" -type f -name "devpod-*" -exec cp {} ./bin \;
find ./bin -name "devpod-*" -exec chmod +x {} \;
ls -R ./bin/
- name: generate uuid
if: matrix.install-kind == true && runner.os != 'Windows' && (matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true')
id: uuid
shell: bash
run: |
UUID=$(python -c "import uuid; print(uuid.uuid4().hex)")
echo "result=$UUID" >> "$GITHUB_OUTPUT"
- name: setup kind (Windows)
if: matrix.install-kind == true && runner.os == 'Windows' && (matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true')
shell: bash
env:
KIND_EXPERIMENTAL_PROVIDER: podman
DOCKER_HOST: npipe:////./pipe/podman-machine-default
run: |
wsl --set-default-version 2
choco install podman-cli kind -y
podman machine init
podman machine set --rootful
podman machine start
kind create cluster --name "${{ steps.uuid.outputs.result }}" --image kindest/node:v1.34.0@sha256:7416a61b42b1662ca6ca89f02028ac133a309a2a30ba309614e8ec94d976dc5a
# NOTE: skevetter/setup-kind does not work on Windows runners
- name: setup kind
if: matrix.install-kind == true && runner.os != 'Windows' && (matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true')
uses: skevetter/setup-kind@v1
with:
name: ${{ steps.uuid.outputs.result }}
version: v0.24.0
image: kindest/node:v1.34.0@sha256:7416a61b42b1662ca6ca89f02028ac133a309a2a30ba309614e8ec94d976dc5a
skipClusterLogsExport: true
- name: remove docker
if: matrix.label == 'docker-install' && (matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true')
run: |
sudo systemctl stop docker.socket docker.service
sudo apt-get remove -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo rm -rf /var/lib/docker /var/lib/containerd /usr/bin/docker /usr/bin/dockerd
- name: run test
if: matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true'
shell: bash
working-directory: ./e2e
env:
# NOTE: GitHub credentials are required for tests using private repos
GH_USERNAME: ${{ github.repository_owner }}
GH_ACCESS_TOKEN: ${{ matrix.requires-secret == true && secrets.GH_PRIVATE_REPO_TOKEN_TEST || github.token }}
run: |
if [ "${{ runner.os }}" == "Linux" ]; then
sudo \
GH_USERNAME="${GH_USERNAME}" \
GH_ACCESS_TOKEN="${GH_ACCESS_TOKEN}" \
KUBECONFIG="${KUBECONFIG:-$HOME/.kube/config}" \
PATH="${PATH}" \
GOROOT="${GOROOT}" \
go test -v -ginkgo.v -timeout 900s --ginkgo.label-filter="${{ matrix.label }}"
else
GH_USERNAME="${GH_USERNAME}" \
GH_ACCESS_TOKEN="${GH_ACCESS_TOKEN}" \
KUBECONFIG="${KUBECONFIG:-$HOME/.kube/config}" \
PATH="${PATH}" \
GOROOT="${GOROOT}" \
DOCKER_HOST="npipe:////./pipe/podman-machine-default" \
go test -v -ginkgo.v -timeout 900s --ginkgo.label-filter="${{ matrix.label }}"
fi
- name: verify docker is installed
if: matrix.label == 'docker-install' && (matrix.requires-secret == false || needs.can-read-secret.outputs.secret-set == 'true')
run: docker --version && docker ps
build-desktop:
name: Build Desktop App for ${{ matrix.arch }} on ${{ matrix.runner }}
needs: build-cli
strategy:
matrix:
include:
- arch: amd64
target: x86_64-unknown-linux-gnu
runner: ubuntu-22.04
tauri_include_updater_json: true
tauri_ci: true
- arch: amd64
target: x86_64-apple-darwin
runner: macos-latest
tauri_include_updater_json: true
tauri_ci: true
- arch: arm64
target: aarch64-apple-darwin
runner: macos-latest
tauri_include_updater_json: true
tauri_ci: false # https://github.com/tauri-apps/tauri/issues/3055
- arch: amd64
target: x86_64-pc-windows-msvc
runner: windows-latest
tauri_include_updater_json: true
tauri_ci: true
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v6
- name: setup Node
uses: actions/setup-node@v6
with:
node-version: "latest"
- name: setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./desktop/src-tauri -> target"
shared-key: "desktop-${{ matrix.runner }}"
- name: get operating system lowercase
id: os
shell: bash
run: |
OS=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')
if [ "$OS" == "macos" ]; then
OS="darwin"
fi
echo "runner_os=$OS" >> "$GITHUB_OUTPUT"
- name: download CLI artifacts
uses: actions/download-artifact@v8
with:
pattern: devpod-*
path: ${{ runner.temp }}/devpod-bin/
merge-multiple: true
- name: setup executable
shell: bash
working-directory: ./desktop/src-tauri
run: |
TEMP_DIR="${{ runner.temp }}"
if [ "${{ runner.os }}" == "Windows" ]; then
TEMP_DIR="${TEMP_DIR//\\//}"
fi
ls -R "$TEMP_DIR/devpod-bin/"
mkdir -p ./bin/
find "$TEMP_DIR/devpod-bin/" -type f -name "devpod-*" -exec cp {} ./bin \;
find ./bin -type f -name "devpod-*" -exec chmod +x {} \;
find ./bin -type f -name "devpod-linux-amd64" -exec mv {} ./bin/devpod-x86_64-unknown-linux-gnu \;
find ./bin -type f -name "devpod-linux-arm64" -exec mv {} ./bin/devpod-aarch64-unknown-linux-gnu \;
find ./bin -type f -name "devpod-darwin-amd64" -exec mv {} ./bin/devpod-x86_64-apple-darwin \;
find ./bin -type f -name "devpod-darwin-arm64" -exec mv {} ./bin/devpod-aarch64-apple-darwin \;
find ./bin -type f -name "devpod-windows-amd64.exe" -exec mv {} ./bin/devpod-x86_64-pc-windows-msvc.exe \;
find ./bin -type f -name "devpod-windows-arm64.exe" -exec mv {} ./bin/devpod-aarch64-pc-windows-msvc.exe \;
ls -R ./bin/
# Linux prerequisites: https://tauri.app/start/prerequisites/#linux
- name: install linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update && sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- name: install desktop dependencies
working-directory: ./desktop
run: yarn install --frozen-lockfile
- name: generate signing key and update config
id: generate
working-directory: ./desktop
shell: bash
run: |
# throwaway signing key for test CI builds
yarn tauri signer generate --ci -w ./app.key -p "github-actions"
TAURI_PUBKEY=$(cat ./app.key.pub)
jq --arg pubkey "$TAURI_PUBKEY" '.plugins.updater.pubkey = $pubkey' src-tauri/tauri.conf.json > tmp.json && mv tmp.json src-tauri/tauri.conf.json
- name: tauri build
uses: tauri-apps/tauri-action@v0.6
with:
projectPath: "./desktop"
args: "--target ${{ matrix.target }}"
includeUpdaterJson: ${{ matrix.tauri_include_updater_json }}
assetNamePattern: "[name]_[platform]_[arch][ext]"
retryAttempts: 1
env:
GITHUB_TOKEN: ${{ github.token }}
TAURI_SIGNING_PRIVATE_KEY: "${{ github.workspace }}/desktop/app.key"
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: "github-actions"
CI: ${{ matrix.tauri_ci }}
- name: upload artifacts
uses: actions/upload-artifact@v7
with:
name: desktop-${{ matrix.runner }}-${{ matrix.arch }}
path: desktop/src-tauri/target/${{ matrix.target }}/release/bundle/**/*
build-flatpak:
name: Build Flatpak
# Use Ubuntu 22.04 to build the flatpak for compatibility with older glibc versions.
# For more details, see https://v2.tauri.app/distribute/appimage/
runs-on: ubuntu-22.04
needs: [build-desktop]
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
options: --privileged
steps:
- uses: actions/checkout@v6
- name: clone shared-modules
run: git clone https://github.com/flathub/shared-modules.git desktop/flatpak/shared-modules
- name: download desktop linux artifact
uses: actions/download-artifact@v8
with:
name: desktop-ubuntu-22.04-amd64
path: /tmp/devpod/
# Use GITHUB_WORKSPACE in containers because the path differs from github.workspace
# for more details, see https://github.com/actions/checkout/issues/785
- name: prepare flatpak manifest for PR build
shell: bash
run: |
sed -i "s|url: https://github.com/skevetter/devpod/releases/download/\${VERSION}/DevPod_linux_amd64.deb|path: /tmp/devpod/deb/DevPod_0.0.0_amd64.deb|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml"
sed -i "s|url: https://github.com/skevetter/devpod/releases/download/\${VERSION}/DevPod.desktop|path: $GITHUB_WORKSPACE/desktop/flatpak/DevPod.desktop|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml"
sed -i "s|url: https://github.com/skevetter/devpod/releases/download/\${VERSION}/DevPod.metainfo.xml|path: $GITHUB_WORKSPACE/desktop/flatpak/DevPod.metainfo.xml|" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml"
sed -i "/sha256: \${SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml"
sed -i "/sha256: \${DESKTOP_SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml"
sed -i "/sha256: \${META_SHA256}/d" "$GITHUB_WORKSPACE/desktop/flatpak/sh.loft.devpod.yml"
- name: update flatpak metadata version and date
run: |
DATE=$(date +%Y-%m-%d)
VERSION="v0.0.0"
sed -i "s/__VERSION__/${VERSION}/g" "$GITHUB_WORKSPACE/desktop/flatpak/DevPod.metainfo.xml"
sed -i "s/__DATE__/${DATE}/g" "$GITHUB_WORKSPACE/desktop/flatpak/DevPod.metainfo.xml"
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: DevPod.flatpak
manifest-path: desktop/flatpak/sh.loft.devpod.yml
cache-key: flatpak-builder-${{ github.sha }}
upload-artifact: true