-
Notifications
You must be signed in to change notification settings - Fork 34
95 lines (91 loc) · 2.57 KB
/
tkltest_unit_ci.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
name: TackleTest-Unit CI
on:
push:
paths-ignore:
- 'tkltest/ui/**'
- 'tkltest-lib/pom_ui.xml'
- 'doc/**'
- 'experiment/**'
- 'setup/tkltestui**'
- 'test/ui/**'
- '.github/workflows/tkltest_ui_ci.yml'
- '.github/workflows/release**'
- '.gitattributes'
- '.gitignore'
- '**.md'
pull_request:
paths-ignore:
- 'tkltest/ui/**'
- 'tkltest-lib/pom_ui.xml'
- 'doc/**'
- 'experiment/**'
- 'setup/tkltestui**'
- 'test/ui/**'
- '.github/workflows/tkltest_ui_ci.yml'
- '.github/workflows/release**'
- '.gitattributes'
- '.gitignore'
- '**.md'
jobs:
build:
strategy:
fail-fast: false
matrix:
version: ['3.9', '3.10', '3.11']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version }}
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Install prerequisites
run: |
ant -version
sudo apt-get update && sudo apt-get install -y bats libxml2-utils
bats --version
xmllint --version
gradle --version
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.4
- name: Download Java libraries
run: |
gradle --version
cd tkltest-lib
./download_lib_jars_unit.sh
cd ..; ls tkltest-lib/*
- name: Install Python dependencies and tkltest-unit command
run: |
python -m pip install --upgrade pip
python -m venv venv
source venv/bin/activate
cp setup/tkltestunit.setup.py ./setup.py
pip install .
which tkltest-unit
docker --version
docker-compose --version
- name: Run Python unit tests
run: |
source venv/bin/activate
green test/unit/test_config.py test/unit/test_tkltest.py test/unit/test_unit_tests.py
green test/unit/test_generate_execute.py
- name: Pull bats dependency and bats tests
run: |
git submodule init
git submodule update
source venv/bin/activate
bats test/unit/test_cli.bats
bats test/unit/test_cli_irs.bats
deactivate
- name: Run tkltest-unit bats tests using docker-compose
run: |
docker build -f ./setup/tkltestunit.Dockerfile --tag tkltest-unit .
docker images
bats test/test_cli_docker.bats