-
Notifications
You must be signed in to change notification settings - Fork 25
68 lines (68 loc) · 1.91 KB
/
test_code.yml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: "Code testing"
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test_clang_format:
name: test clang format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: install dependencies
run: sudo apt-get install gcc g++ libzmq3-dev cmake build-essential git
- name: configure
run: mkdir build && cd build && cmake ..
- name: clang-format
run: cmake --build build --target format
- name: check formatting
run: git diff --exit-code || ( >&2 echo "Please run 'make format' to fix these issues automatically." && false )
run_cmake_build:
name: run cmake build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: install dependencies
run: sudo apt-get install gcc g++ libzmq3-dev cmake build-essential
- name: configure
run: mkdir build && cd build && cmake -DCMAKE_CXX_FLAGS="-Werror" ..
- name: build
run: cmake --build build
- name: test
run: ./build/ursadb_test
build_docker_image:
name: build docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
with:
submodules: true
- name: Build image
uses: docker/build-push-action@v1
with:
push: false
e2etest:
name: run e2e tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: install dependencies
run: sudo apt-get install gcc g++ libzmq3-dev cmake build-essential git python3 python3-pip
- name: install python dependencies
run: pip3 install pyzmq pytest
- name: configure
run: mkdir build && cd build && cmake -DCMAKE_CXX_FLAGS="-Werror" ..
- name: build
run: cd build && make ursadb ursadb_new
- name: test
run: python3 -m pytest