forked from apache/incubator-kie-kogito-serverless-operator
-
Notifications
You must be signed in to change notification settings - Fork 1
110 lines (97 loc) · 2.96 KB
/
checks.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: PR checks
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- "LICENSE"
- "**/.gitignore"
- "**.md"
- "**.adoc"
- "*.txt"
- "docsimg/**"
- ".ci/jenkins/**"
env:
GO_VERSION: 1.20
jobs:
unit-tests:
concurrency:
group: sonataflow-operator-unit-tests-${{ github.head_ref }}
cancel-in-progress: true
timeout-minutes: 60
name: Unit tests And Coverage
runs-on: ubuntu-latest
steps:
# Packages for testing with Podman
- name: Install package
run: |
sudo apt-get -y install \
btrfs-progs \
libgpgme-dev \
libbtrfs-dev \
libdevmapper-dev
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Go
id: go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Run tests
run: make test test-workflowproj
- uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: cover.out
check-headers:
concurrency:
group: sonataflow-operator-check-headers-${{ github.head_ref }}
cancel-in-progress: true
timeout-minutes: 60
name: Check headers
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Go
id: go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Check headers
run: |
make addheaders
changed_files=$(git status -s)
[[ -z "$changed_files" ]] || (printf "Some files are missing the headers: \n$changed_files\n Did you run 'make addheaders' before sending the PR" && exit 1)
check-generation:
concurrency:
group: sonataflow-operator-check-generation-${{ github.head_ref }}
cancel-in-progress: true
timeout-minutes: 60
name: Check files generation
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
# since we now have to download container-builder deps, we need these packages installed before generating our types.
- name: Install packages
run: |
sudo apt-get update &&\
sudo apt-get -y install --no-install-recommends \
btrfs-progs \
libgpgme-dev \
libbtrfs-dev \
libdevmapper-dev
- name: Install Go
id: go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Check generations
run: |
make generate-all
changed_files=$(git status -s)
[[ -z "$changed_files" ]] || (printf "Generation has not been done on this PR. See modified files: \n$changed_files\n Did you run 'make generate-all' before sending the PR" && exit 1)