summaryrefslogtreecommitdiff
path: root/.github/workflows/test.yml
blob: a3cbc35c9e4a1fa99d70bfee49809b03ac1643fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Test Suite

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

jobs:

  test:
    name: Test
    runs-on: ubuntu-latest
    strategy:
      matrix:
        go_version:
          - '~1.16'
          - '~1.17'
          - '^1.18'

    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      
      - name: Setup Go
        uses: actions/setup-go@v3
        with:
          go-version: ${{ matrix.go_version }}

      # apt repos don't have YARA v4.2, install it from git
      - name: Install YARA
        run: |
          git clone --depth 1 https://github.com/virustotal/yara.git
          cd yara
          bash ./build.sh
          sudo make install
          cd ..

      - name: Run tests
        run: |
          make
          make tests
        env:
          LD_LIBRARY_PATH: /usr/local/lib