diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index c89456a9..300cf4fb 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -47,35 +47,29 @@ jobs: run: | rm -rf output rm -f tests/.local - #### Experimental stuff: - # Remove KiAuto - dpkg --remove kiauto - # Install KiAuto@master - curl https://codeload.github.com/INTI-CMNB/KiAuto/zip/refs/heads/master --output pp.zip - unzip pp.zip - pip3 install KiAuto-master/ - # Clean the downloaded stuff - rm -rf KiAuto-master/ pp.zip - # Check what we got - echo $PATH - ls -la /usr/bin/*_do || true - ls -la /usr/local/bin/*_do || true - which pcbnew_do - pcbnew_do --version - #### End Experimental stuff - # Unify coverage versions to allow combine - pip3 install --upgrade coverage==5.1 - ln -s /usr/local/bin/coverage3 /usr/local/bin/python3-coverage || true - # The KiCad 5 image currently has a very old pytest (no parallel run) - pip3 install --upgrade pytest - pip3 install --upgrade pytest-xdist + ##### Experimental stuff: + ## Remove KiAuto + #dpkg --remove kiauto + ## Install KiAuto@master + #curl https://codeload.github.com/INTI-CMNB/KiAuto/zip/refs/heads/master --output pp.zip + #unzip pp.zip + #pip3 install KiAuto-master/ + ## Clean the downloaded stuff + #rm -rf KiAuto-master/ pp.zip + ## Check what we got + #echo $PATH + #ls -la /usr/bin/*_do || true + #ls -la /usr/local/bin/*_do || true + #which pcbnew_do + #pcbnew_do --version + ##### End Experimental stuff # Ensure we start a fresh coverage meassurement python3-coverage erase # Create the caches with macros python3-coverage run src/kibot --help-outputs > /dev/null # Individual run for specific tests # pytest --log-cli-level debug -k "test_ibom_parse_fail" --test_dir=output - # Run the 90% faster tests (under 3 s) + # Run the 90% faster tests (under 3 s) together # Do it in parallel ./${{ matrix.w_tests }}.sh - name: Store coverage diff --git a/Makefile b/Makefile index 6dbb588d..80142ff8 100644 --- a/Makefile +++ b/Makefile @@ -93,7 +93,7 @@ test_docker_local_1_ki6: # Run in the same directory to make the __pycache__ valid # Also change the owner of the files to the current user (we run as root like in GitHub) docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:ki6 \ - /bin/bash -c "flake8 . --count --statistics ; python3-coverage run -a src/kibot --help-outputs > /dev/null; pytest-3 --log-cli-level debug -k 'test_dep_pytool' --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ tests/.config/kiplot/plugins/__pycache__/ tests/test_plot/fake_pcbnew/__pycache__/ tests/.config/kibot/plugins/__pycache__/ .coverage htmlcov/" + /bin/bash -c "flake8 . --count --statistics ; python3-coverage run src/kibot --help-outputs > /dev/null; pytest-3 --log-cli-level debug -k 'test_dep_pytool' --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ tests/.config/kiplot/plugins/__pycache__/ tests/test_plot/fake_pcbnew/__pycache__/ tests/.config/kibot/plugins/__pycache__/ .coverage htmlcov/" #$(PY_COV) report #x-www-browser htmlcov/index.html @@ -104,10 +104,10 @@ test_docker_local: # Run in the same directory to make the __pycache__ valid # Also change the owner of the files to the current user (we run as root like in GitHub) docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:latest \ - /bin/bash -c "flake8 . --count --statistics ; python3-coverage run -a src/kibot --help-outputs ; pytest-3 --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage htmlcov/" - # $(PY_COV) report - # x-www-browser htmlcov/index.html - $(PY_COV) erase + /bin/bash -c "flake8 . --count --statistics ; python3-coverage run src/kibot --help-outputs ; pytest-3 --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage htmlcov/" + $(PY_COV) combine + $(PY_COV) report + x-www-browser htmlcov/index.html test_docker_local_ki6: rm -rf output @@ -116,7 +116,7 @@ test_docker_local_ki6: # Run in the same directory to make the __pycache__ valid # Also change the owner of the files to the current user (we run as root like in GitHub) docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:ki6 \ - /bin/bash -c "flake8 . --count --statistics ; python3-coverage run -a src/kibot --help-outputs ; pytest-3 --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage htmlcov/" + /bin/bash -c "flake8 . --count --statistics ; python3-coverage run src/kibot --help-outputs ; pytest-3 --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage htmlcov/" $(PY_COV) combine $(PY_COV) report x-www-browser htmlcov/index.html diff --git a/tools/dev_image/Dockerfile b/tools/dev_image/Dockerfile index a63b3671..eff2ccf0 100644 --- a/tools/dev_image/Dockerfile +++ b/tools/dev_image/Dockerfile @@ -2,7 +2,7 @@ FROM setsoft/kicad_auto:latest MAINTAINER Salvador E. Tropea LABEL Description="KiCad 5 with KiBot and other automation scripts" -RUN dpkg --remove kicost kibot kiauto && \ +RUN dpkg --remove kicost kibot && \ apt-get update && \ apt-get -y install --no-install-recommends python3-pip unzip curl python3-setuptools python3-wheel && \ curl https://codeload.github.com/INTI-CMNB/KiBot/zip/refs/heads/master --output pp.zip && \ @@ -13,9 +13,11 @@ RUN dpkg --remove kicost kibot kiauto && \ unzip pp.zip && \ pip3 install KiCost-master/ && \ rm -rf KiCost-master pp.zip && \ - curl https://codeload.github.com/INTI-CMNB/KiAuto/zip/refs/heads/master --output pp.zip && \ - unzip pp.zip && \ - pip3 install KiAuto-master/ && \ - rm -rf KiAuto-master/ pp.zip && \ apt-get -y remove curl python3-pip unzip python3-setuptools python3-wheel && \ rm -rf /var/lib/apt/lists/* + +# dpkg --remove kiauto && \ +# curl https://codeload.github.com/INTI-CMNB/KiAuto/zip/refs/heads/master --output pp.zip && \ +# unzip pp.zip && \ +# pip3 install KiAuto-master/ && \ +# rm -rf KiAuto-master/ pp.zip && \ diff --git a/tools/dev_image_k6/Dockerfile b/tools/dev_image_k6/Dockerfile index c5dda4c7..0bcea96f 100644 --- a/tools/dev_image_k6/Dockerfile +++ b/tools/dev_image_k6/Dockerfile @@ -2,7 +2,7 @@ FROM setsoft/kicad_auto:ki6 MAINTAINER Salvador E. Tropea LABEL Description="KiCad 6 with KiBot and other automation scripts" -RUN dpkg --remove kicost kibot kiauto && \ +RUN dpkg --remove kicost kibot && \ apt-get update && \ apt-get -y install --no-install-recommends -t bullseye-backports python3-pip unzip curl python3-setuptools python3-wheel && \ curl https://codeload.github.com/INTI-CMNB/KiBot/zip/refs/heads/master --output pp.zip && \ @@ -13,10 +13,12 @@ RUN dpkg --remove kicost kibot kiauto && \ unzip pp.zip && \ pip3 install KiCost-master/ && \ rm -rf KiCost-master pp.zip && \ - curl https://codeload.github.com/INTI-CMNB/KiAuto/zip/refs/heads/master --output pp.zip && \ - unzip pp.zip && \ - pip3 install KiAuto-master/ && \ - rm -rf KiAuto-master/ pp.zip && \ apt-get -y remove curl python3-pip unzip python3-setuptools python3-wheel && \ rm -rf /var/lib/apt/lists/* +# dpkg --remove kiauto && \ +# curl https://codeload.github.com/INTI-CMNB/KiAuto/zip/refs/heads/master --output pp.zip && \ +# unzip pp.zip && \ +# pip3 install KiAuto-master/ && \ +# rm -rf KiAuto-master/ pp.zip && \ +