## Copyright (C) 2012 - 2026 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

## AI-Assisted

name: unit-tests

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]
  workflow_dispatch:

permissions:
  contents: read

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  unit-tests:
    name: Unit Tests
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
        with:
          persist-credentials: false

      - name: Install apt deps + genmkfile + helper-scripts + msgcollector
        uses: org-ai-assisted/developer-meta-files/.github/actions/install-deps@master
        with:
          apt-packages: 'bash safe-rm moreutils procps inotify-tools'
          install-self: 'true'

      - name: Run unit tests
        run: tests/unit-tests.bash
