on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

name: run tests
jobs:
  test:
    strategy:
      matrix:
        go-version: [1.16.x, 1.17.x, 1.18.x]
        platform: [ubuntu-latest]
    runs-on: ${{ matrix.platform }}
    steps:
      - name: Install Go
        if: success()
        uses: actions/setup-go@v2
        with:
          go-version: ${{ matrix.go-version }}
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Setup udev device correctly
        run: echo KERNEL==\"uinput\", GROUP=\"$USER\", MODE:=\"0660\" | sudo tee /etc/udev/rules.d/99-$USER.rules && sudo udevadm trigger
      - name: Run tests
        run: go test -coverprofile=coverage.txt -covermode=atomic
      - name: Upload coverage
        run: bash <(curl -s https://codecov.io/bash)


on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

name: run tests
jobs:
  test:
    strategy:
      matrix:
        go-version: [1.18.x]
        platform: [ubuntu-latest]
    runs-on: ${{ matrix.platform }}
    steps:
      - name: Install Go
        if: success()
        uses: actions/setup-go@v2
        with:
          go-version: ${{ matrix.go-version }}
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Setup udev device correctly
        run: | 
          echo KERNEL==\"uinput\", GROUP=\"$USER\", MODE:=\"0660\" | sudo tee /etc/udev/rules.d/99-$USER.rules 
          sudo udevadm trigger
          sudo udevadm info /dev/uinput
      - name: Run tests
        run: go test -coverprofile=coverage.txt -covermode=atomic
      - name: Upload coverage
        run: bash <(curl -s https://codecov.io/bash)


Add udev info in order to check for issues in environment setup
Add udev info in order to check for issues in environment setup
