-
Notifications
You must be signed in to change notification settings - Fork 6
63 lines (59 loc) · 2.3 KB
/
on_commit.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
name: Commit CI/CD # workflow name
on: # trigger
push:
branches: [dev, master]
pull_request:
types: [opened, reopened, edited]
# parallel jobs to perform
jobs:
unit_tests_linux:
name: Run unit tests on Linux
runs-on: ubuntu-latest # runner
if: ${{ (!contains(github.event.head_commit.message, '#notest') && !contains(github.event.head_commit.message, '#nolinuxtest')) || github.ref == 'refs/heads/master' }}
steps: # tasks
- name: Set Github Workspace # access Github Workspace
uses: actions/checkout@v2
- name: Set up Python 3.10 # set architecture and Python3
uses: actions/setup-python@v3
with:
python-version: "3.10"
architecture: "x64" # architecture
- name: Install test dependencies
uses: ./.github/common/install_test_dependencies
- name: Build from source
uses: ./.github/common/build_from_source
- name: Run unit tests # run unittests
uses: ./.github/common/unit_tests
unit_tests_windows:
name: Run unit tests on Windows
runs-on: windows-latest # runner
if: ${{ !contains(github.event.head_commit.message, '#notest') || github.ref == 'refs/heads/master' }}
steps: # tasks
- name: Set Github Workspace # access Github Workspace
uses: actions/checkout@v2
- name: Set up Python 3.10 # set architecture and Python3
uses: actions/setup-python@v2
with:
python-version: "3.10"
architecture: "x64" # architecture
- name: Install test dependencies on windows
uses: ./.github/common/install_test_dependencies_windows
- name: Build from source
uses: ./.github/common/build_from_source
- name: Run unit tests # run unittests
uses: ./.github/common/unit_tests
code_analysis:
name: Run code analysis
runs-on: ubuntu-latest # runner
steps: # tasks
- name: Set Github Workspace # access Github Workspace
uses: actions/checkout@v2
- name: Set up Python 3.10 # set architecture and Python3
uses: actions/setup-python@v2
with:
python-version: "3.10"
architecture: "x64" # architecture
- name: Install dependencies
uses: ./.github/common/install_dependencies
- name: Run code analysis
uses: ./.github/common/code_quality