E2E #361
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
name: E2E | |
on: | |
schedule: | |
- cron: '0 4 * * *' # Every day at 4:00 UTC (not to interfere with fuzzing) | |
workflow_dispatch: | |
jobs: | |
update_vm: | |
runs-on: e2e-host | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # ratchet:actions/checkout@v3 | |
- name: Update VM | |
env: | |
GCS_KEY: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }} | |
run: | | |
export GOOGLE_APPLICATION_CREDENTIALS=/tmp/gcp.json | |
echo "${GCS_KEY}" > ${GOOGLE_APPLICATION_CREDENTIALS} | |
function cleanup { | |
rm /tmp/gcp.json | |
} | |
trap cleanup EXIT | |
python3 Testing/integration/actions/update_vm.py macOS_14.bundle.tar.gz | |
start_vm: | |
runs-on: e2e-host | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # ratchet:actions/checkout@v3 | |
- name: Start VM | |
env: | |
RUNNER_REG_TOKEN: ${{ secrets.RUNNER_REG_TOKEN }} | |
run: python3 Testing/integration/actions/start_vm.py macOS_14.bundle.tar.gz | |
integration: | |
runs-on: e2e-vm | |
env: | |
VM_PASSWORD: ${{ secrets.VM_PASSWORD }} | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # ratchet:actions/checkout@v3 | |
- name: Add homebrew to PATH | |
run: echo "/opt/homebrew/bin/" >> $GITHUB_PATH | |
- name: Install configuration profile | |
run: bazel run //Testing/integration:install_profile -- Testing/integration/configs/default.mobileconfig | |
- name: Build, install, and sync santa | |
run: | | |
bazel run :reload --define=SANTA_BUILD_TYPE=adhoc | |
bazel run //Testing/integration:allow_sysex | |
- name: Test config changes | |
run: ./Testing/integration/test_config_changes.sh | |
- name: Build, install, and start moroz | |
run: | | |
bazel build @com_github_groob_moroz//cmd/moroz:moroz | |
cp bazel-bin/external/com_github_groob_moroz/cmd/moroz/moroz_/moroz /tmp/moroz | |
/tmp/moroz -configs="$GITHUB_WORKSPACE/Testing/integration/configs/moroz_default/global.toml" -use-tls=false & | |
sudo santactl sync --debug | |
- name: Run integration test binaries | |
run: | | |
bazel test //Testing/integration:integration_tests | |
sleep 3 | |
bazel run //Testing/integration:dismiss_santa_popup || true | |
- name: Test sync server changes | |
run: ./Testing/integration/test_sync_changes.sh | |
- name: Test USB blocking | |
run: ./Testing/integration/test_usb.sh | |
- name: Poweroff | |
if: ${{ always() }} | |
run: sudo shutdown -h +1 |