File: unit-tests.yml

package info (click to toggle)
bgpq4 1.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 608 kB
  • sloc: ansic: 6,303; sh: 99; makefile: 44
file content (40 lines) | stat: -rw-r--r-- 976 bytes parent folder | download
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
name: basic unit tests

on:
  pull_request:
    types:
      - opened
      - edited
      - reopened
      - ready_for_review
      - synchronize
  push:
    branches:
      - main
  workflow_call:

jobs:
  output-unit-tests:
    name: output unit tests
    runs-on: ubuntu-24.04
    steps:
      - name: clone repo
        uses: actions/checkout@v4
      - name: install pre-reqs
        run: |
          sudo apt-get update
          DEBIAN_FRONTEND=noninteractive sudo apt-get -y --no-install-recommends install autoconf automake libtool make
      - name: build bgpq4
        run: |
          ./bootstrap
          ./configure
          make
          ./bgpq4 -v
      - name: generate output
        run: ./tests/generate_outputs.sh ./bgpq4 /tmp
      - name: check output
        run: >
          for file in tests/reference/*.txt;
          do
            echo "$(sha256sum "${file}" | awk '{print $1}') /tmp/$(basename "${file}")" | sha256sum --check;
          done