fleet/.github/workflows/test-fma-darwin.yml
Konstantin Sykulev b1a392d672
FMA test automation (#31210)
For #29183

# Checklist for submitter

- [x] Added/updated automated tests
- [x] Manual QA for all new/changed functionality


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Introduced automated validation workflows for maintained applications
on both macOS and Windows, ensuring apps can be installed, verified, and
uninstalled as expected.
* Added new command-line tool to validate maintained apps, providing
detailed reporting on validation results.
* Enhanced detection and handling of pre-installed applications during
validation.
* Improved post-installation steps for macOS, including quarantine
removal and system refresh.

* **Chores**
* Added new continuous integration workflows to automate application
validation on pull requests for relevant files.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-31 15:23:36 -05:00

69 lines
2 KiB
YAML

name: Test Fleet Maintained Apps - Darwin
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- ee/maintained-apps/inputs/**
- ee/maintained-apps/outputs/**
- cmd/maintained-apps/validate/**
workflow_dispatch: # Manual trigger
inputs:
log_level:
description: 'Log level (debug, info, warn, error)'
required: false
default: 'info'
type: choice
options:
- debug
- info
- warn
- error
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
test-fma:
env:
LOG_LEVEL: ${{ github.event.inputs.log_level || 'info' }}
runs-on: macos-latest
steps:
- name: Checkout Fleet
uses: actions/checkout@v4
with:
repository: fleetdm/fleet
fetch-depth: 1
ref: ${{ github.ref }}
path: fleet
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'fleet/go.mod'
- name: Install osquery mac
run: |
echo "Runner architecture: $(uname -m)"
curl -L -o osquery.tar.gz "https://github.com/osquery/osquery/releases/download/5.18.1/osquery-5.18.1_1.macos_arm64.tar.gz"
tar -xzf osquery.tar.gz
sudo cp -r opt /
sudo cp -r private /
sudo ln -sf /opt/osquery/lib/osquery.app/Contents/MacOS/osqueryd /usr/local/bin/osqueryi
sudo ln -sf /opt/osquery/lib/osquery.app/Contents/Resources/osqueryctl /usr/local/bin/osqueryctl
- name : Remove pre-installed google chrome mac
run: |
ls /Applications | grep -i "Chrome"
find /Applications -name "*Chrome*.app" -type d | while read app;
do
echo "Removing $app..."
sudo rm -rf "$app"
done
- name: Verify Fleet Maintained Apps mac
run: |
ls /Applications
cd fleet
sudo -E go run ./cmd/maintained-apps/validate