Updated setup, version, test assertion #726
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |