Skip to content

build(deps-dev): bump vite from 6.4.1 to 6.4.2 in /cmd/paretosecurity-installer/ui #1845

build(deps-dev): bump vite from 6.4.1 to 6.4.2 in /cmd/paretosecurity-installer/ui

build(deps-dev): bump vite from 6.4.1 to 6.4.2 in /cmd/paretosecurity-installer/ui #1845

Workflow file for this run

# Run all tests, linters, code analysis and other QA tasks on
# every push to master and PRs.
#
# To SSH into the runner to debug a failure, add the following step before
# the failing step
# - uses: mxschmitt/action-tmate@v3
# with:
# install-dependencies: false
name: Build Tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
# Remove concurrency group to allow all matrix jobs to run without canceling
# concurrency:
# group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
# cancel-in-progress: false
jobs:
windows:
name: Windows Test of a Build
runs-on: windows-2025
needs: [build]
steps:
- name: Download build
uses: actions/download-artifact@v5
with:
name: build
- name: Display structure of downloaded files
run: ls -R
- name: Run Windows schema
run: agent_windows_amd64_v1/paretosecurity schema > windows.json
- name: Upload Windows schema
uses: actions/upload-artifact@v4
with:
path: windows.json
name: windows.json
- name: Run Windows tests
run: agent_windows_amd64_v1/paretosecurity check || true
- name: Minimize all windows
run: |
$shell = New-Object -ComObject "Shell.Application"
$shell.MinimizeAll()
shell: pwsh
- name: Install Edge WebView2 Runtime
run: winget install -e --id Microsoft.EdgeWebView2Runtime --silent --accept-package-agreements --accept-source-agreements --disable-interactivity
continue-on-error: true
- name: Run Installer
run: |
# Start the installer in a new process
Start-Process -FilePath "installer_windows_amd64_v1/paretosecurity-installer.exe"
# Wait until the process is running
$timeout = 30
$found = $false
for ($i = 0; $i -lt $timeout; $i++) {
if (Get-Process -Name "paretosecurity-installer" -ErrorAction SilentlyContinue) {
$found = $true
break
}
Start-Sleep -Seconds 1
}
if (-not $found) {
Write-Error "paretosecurity-installer.exe did not start within $timeout seconds"
exit 1
}
shell: pwsh
- name: Capture Screenshot
run: |
Add-Type -AssemblyName System.Windows.Forms
$bitmap = New-Object Drawing.Bitmap([System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Width, [System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Height)
$graphics = [Drawing.Graphics]::FromImage($bitmap)
$graphics.CopyFromScreen(0, 0, 0, 0, $bitmap.Size)
$bitmap.Save("installer_screenshot.png")
shell: pwsh
- name: Upload Screenshot
uses: actions/upload-artifact@v4
with:
name: installer-screenshot
path: installer_screenshot.png
- name: Run tray app
run: |
# Start the tray in a new process
Start-Process -FilePath "tray_windows_amd64_v1/paretosecurity-tray.exe"
shell: pwsh
- name: Capture Screenshot
run: |
Add-Type -AssemblyName System.Windows.Forms
$bitmap = New-Object Drawing.Bitmap([System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Width, [System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Height)
$graphics = [Drawing.Graphics]::FromImage($bitmap)
$graphics.CopyFromScreen(0, 0, 0, 0, $bitmap.Size)
$bitmap.Save("tray_screenshot.png")
shell: pwsh
- name: Upload Screenshot
uses: actions/upload-artifact@v4
with:
name: tray-screenshot
path: tray_screenshot.png
# New job to add screenshots to PR comments
pr-comment:
name: Add Screenshots to PR
runs-on: ubuntu-latest
needs: [windows]
# Only run on PRs and if installer files or shared,cmd files have changed
if: github.event_name == 'pull_request' && (contains(join(github.event.pull_request.files.*.filename, ' '), 'shared/') || contains(join(github.event.pull_request.files.*.filename, ' '), 'cmd/'))
permissions:
pull-requests: write # Explicitly set permissions for creating/updating PR comments
steps:
- name: Download installer screenshot artifact
uses: actions/download-artifact@v5
with:
name: installer-screenshot
# Defaults to downloading to the workspace root, e.g., installer_screenshot.png
- name: Download tray screenshot artifact
uses: actions/download-artifact@v5
with:
name: tray-screenshot
# Defaults to downloading to the workspace root, e.g., tray_screenshot.png
- name: Upload installer screenshot to R2
id: upload_installer_r2
uses: ryand56/r2-upload-action@b801a390acbdeb034c5e684ff5e1361c06639e7c # latest
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: pareto-screenshots
source-dir: .
destination-dir: pr-${{ github.event.pull_request.number }}-run-${{ github.run_number }}
- name: Comment on PR with screenshots
uses: actions/github-script@v8
env: # Pass Imgur URLs to the script
INSTALLER_IMG_URL: https://pub-c7fcfbff2e2e4eb0b9148db4024b12bc.r2.dev/pr-${{ github.event.pull_request.number }}-run-${{ github.run_number }}/installer_screenshot.png
TRAY_IMG_URL: https://pub-c7fcfbff2e2e4eb0b9148db4024b12bc.r2.dev/pr-${{ github.event.pull_request.number }}-run-${{ github.run_number }}/tray_screenshot.png
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const installerImgUrl = process.env.INSTALLER_IMG_URL;
const trayImgUrl = process.env.TRAY_IMG_URL;
if (!installerImgUrl || installerImgUrl === "null" || !trayImgUrl || trayImgUrl === "null") {
core.setFailed('Failed to get Imgur URLs for one or both images. Installer URL: ' + installerImgUrl + ', Tray URL: ' + trayImgUrl);
return;
}
const body = `## Windows Installation Screenshots
### Installer Window
![Installer Screenshot](${installerImgUrl})
### System Tray
![Tray Screenshot](${trayImgUrl})
`;
// Get all comments on the PR
const comments = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});
// Look for an existing Windows screenshots comment
const existingComment = comments.data.find(comment =>
comment.body.includes('## Windows Installation Screenshots')
);
if (existingComment) {
// Update existing comment
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: existingComment.id,
body: body
});
console.log('Updated existing Windows screenshots comment with embedded images.');
} else {
// Post new comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: body
});
console.log('Created new Windows screenshots comment with embedded images.');
}
dev-build-notify:
name: Notify about dev builds
runs-on: ubuntu-latest
needs: [build]
if: github.event_name == 'pull_request'
permissions:
pull-requests: write
steps:
- name: Comment on PR about dev builds
uses: actions/github-script@v8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const body = `## 🚀 Dev Builds Available
Development builds for this PR are available in the [workflow artifacts](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}).
Available builds:
- Windows (agent, installer, tray)
- Linux (agent)
- macOS (agent)
Download the \`build\` artifact to test the latest changes.
`;
// Get all comments on the PR
const comments = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});
// Look for an existing dev builds comment
const existingComment = comments.data.find(comment =>
comment.body.includes('## 🚀 Dev Builds Available')
);
if (existingComment) {
// Update existing comment
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: existingComment.id,
body: body
});
console.log('Updated existing dev builds comment.');
} else {
// Post new comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: body
});
console.log('Created new dev builds comment.');
}
checks-on-linux:
name: "Install and Run on ${{ matrix.distribution }}"
runs-on: ubuntu-latest
needs: [build]
strategy:
fail-fast: false
matrix:
# https://images.linuxcontainers.org/
distribution: [debian/13, debian/12, ubuntu/25.10, ubuntu/24.04, ubuntu/22.04, fedora/43, fedora/42, archlinux]
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Download build
uses: actions/download-artifact@v5
with:
name: build
- name: Install Incus
run: |
sudo wget -O /etc/apt/keyrings/zabbly.asc https://pkgs.zabbly.com/key.asc
sudo sh -c 'cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-stable.sources
Enabled: yes
Types: deb
URIs: https://pkgs.zabbly.com/incus/stable
Suites: $(. /etc/os-release && echo ${VERSION_CODENAME})
Components: main
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/zabbly.asc
EOF'
sudo apt update
sudo systemctl stop docker
sudo apt purge docker -y
sudo nft list ruleset
sudo nft flush ruleset
sudo apt install -y incus
sudo chmod 666 /var/lib/incus/unix.socket
- name: Prepare image
run: |
sudo incus admin init --auto
chmod +x agent_linux_amd64_v1/paretosecurity
sudo incus launch images:${{ matrix.distribution }} pareto
sudo incus file push agent_linux_amd64_v1/paretosecurity pareto/opt/paretosecurity
sudo incus file push apt/install.sh pareto/opt/install.sh
- name: Wait for network
run: |
sleep 10
- name: Run Linux schema
run: |
sudo incus exec pareto -- /opt/paretosecurity schema
- name: Run installer
run: |
# Skip recommended packages in CI to avoid pulling in desktop dependencies
sudo incus exec pareto -- env PARETO_APT_OPTS="--no-install-recommends" PARETO_DNF_OPTS="--setopt=install_weak_deps=False" bash /opt/install.sh
sudo incus exec pareto -- sudo systemctl daemon-reload
sudo incus exec pareto -- sudo systemctl enable paretosecurity.service
sudo incus exec pareto -- sudo systemctl enable paretosecurity.socket
- name: Verify CLI is installed
run: |
sudo incus exec pareto -- paretosecurity info
- name: Run Linux tests
run: |
sudo incus exec pareto -- /opt/paretosecurity check || true
- name: Run Linux info
run: |
sudo incus exec pareto -- /opt/paretosecurity info
- name: Run Linux status
run: |
sudo incus exec pareto -- /opt/paretosecurity status
build:
name: Unstable build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version: stable
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
# 'latest', 'nightly', or a semver
version: "~> v2"
args: release --skip=publish --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
name: Upload build
with:
name: build
path: dist