name: Test and build

on: [pull_request]

jobs:
  build:
    strategy:
      matrix:
        os: ['ubuntu-20.04', 'ubuntu-18.04', 'macos-latest']
      fail-fast: false
    runs-on: ${{ matrix.os }}
    steps:
    - name: Install Dependencies (Linux)
      run: |
        sudo apt-get update -y
        sudo apt-get install -y devscripts debhelper moreutils fakeroot jq pigz help2man
        wget "https://github.com/koalaman/shellcheck/releases/download/latest/shellcheck-latest.linux.x86_64.tar.xz"
        tar --xz -xvf "shellcheck-latest.linux.x86_64.tar.xz"
        sudo cp shellcheck-latest/shellcheck /usr/bin/shellcheck
      if: matrix.os != 'macos-latest'
    - name: Install Dependencies (macOS)
      run: |
        brew install gnu-tar shellcheck jq pigz coreutils gnu-sed gnu-getopt wget
        brew install moreutils gawk
      if: matrix.os == 'macos-latest'
    - name: Get Sources
      uses: actions/checkout@v2
    - name: Test
      run: |
        export PATH="$PATH:/snap/bin"
        make test
      shell: bash
    - name: Build (Linux)
      run: DEB_BUILD_OPTIONS=nocheck debuild -us -uc
      if: matrix.os != 'macos-latest'

name: Test and build

on: [pull_request]

jobs:
  build:
    strategy:
      matrix:
        os: ['ubuntu-22.04', 'ubuntu-20.04', 'ubuntu-18.04', 'macos-latest']
      fail-fast: false
    runs-on: ${{ matrix.os }}
    steps:
    - name: Install Dependencies (Linux)
      run: |
        sudo apt-get update -y
        sudo apt-get install -y devscripts debhelper moreutils fakeroot jq pigz help2man
        wget "https://github.com/koalaman/shellcheck/releases/download/latest/shellcheck-latest.linux.x86_64.tar.xz"
        tar --xz -xvf "shellcheck-latest.linux.x86_64.tar.xz"
        sudo cp shellcheck-latest/shellcheck /usr/bin/shellcheck
      if: matrix.os != 'macos-latest'
    - name: Install Dependencies (macOS)
      run: |
        brew install gnu-tar shellcheck jq pigz coreutils gnu-sed gnu-getopt wget
        brew install moreutils gawk
      if: matrix.os == 'macos-latest'
    - name: Get Sources
      uses: actions/checkout@v2
    - name: Test
      run: |
        export PATH="$PATH:/snap/bin"
        make test
      shell: bash
    - name: Build (Linux)
      run: DEB_BUILD_OPTIONS=nocheck debuild -us -uc
      if: matrix.os != 'macos-latest'

Add ubuntu-22.04 runner to Actions Matrix
Add ubuntu-22.04 runner to Actions Matrix

The new runner version is going GA https://github.com/actions/virtual-environments/issues/5998