summaryrefslogtreecommitdiff
path: root/.github/workflows/test.yaml
blob: 23b3b64c243fffe50f185475268f43e8733fd6e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
on: [push, pull_request]
name: Test
jobs:
  test:
    strategy:
      matrix:
        go-version: [1.20.x, 1.21.x]
        os: [ubuntu-latest]
    runs-on: ${{ matrix.os }}
    steps:
    - name: Install Go
      uses: actions/setup-go@v4
      with:
        go-version: ${{ matrix.go-version }}
    - name: Install PAM
      run: sudo apt install -y libpam-dev
    - name: Add a test user
      run: sudo useradd -d /tmp/test -p '$1$Qd8H95T5$RYSZQeoFbEB.gS19zS99A0' -s /bin/false test
    - name: Checkout code
      uses: actions/checkout@v4
    - name: Test
      run: sudo go test -v ./...