name: ci
on: [pull_request, workflow_dispatch]
jobs:
  check:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: ["ubuntu-22.04", "ubuntu-20.04"]
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: true
      - run: |
          make depends
          # -common seems a catch-22, but this is just a shortcut to
          # initialize user and dirs, some used through tests.
          sudo apt-get -y install landscape-common
      - run: make check TRIAL=/usr/bin/trial3
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: true
      - run: make depends
      - run: make lint
