name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check code style
run: cargo fmt -- --check
- name: Build
run: cargo build --verbose
- name: Run tests
run: |
./tests/download_log_files.sh
cargo run -- --connect file:/tmp/testlogs/ArduSub-test.tlog --verbose | sort | uniq > output.txt
if [ $(grep -f tests/output.txt output.txt | wc -l) -ne "$(cat tests/output.txt | wc -l)" ]; then exit 1; fi;