From 267a354313b785e33f29991f9927cc38d54197b5 Mon Sep 17 00:00:00 2001 From: RonTamG <33351836+RonTamG@users.noreply.github.com> Date: Sat, 11 Nov 2023 21:32:26 +0000 Subject: [PATCH] ci: added git download and install test to ci --- .github/workflows/python-app.yaml | 4 +++- tests/acceptance_tests/install_git.sh | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yaml b/.github/workflows/python-app.yaml index da4ea51..8e2cb62 100644 --- a/.github/workflows/python-app.yaml +++ b/.github/workflows/python-app.yaml @@ -19,7 +19,7 @@ permissions: jobs: test: - runs-on: windows-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -39,6 +39,8 @@ jobs: run: mypy --check . - name: Test run: pytest + - name: Test git download and install + run: /bin/bash ./tests/acceptance_tests/install_git.sh --no-progress-bar build_executables: needs: test diff --git a/tests/acceptance_tests/install_git.sh b/tests/acceptance_tests/install_git.sh index ab77bad..51c8ade 100644 --- a/tests/acceptance_tests/install_git.sh +++ b/tests/acceptance_tests/install_git.sh @@ -1,11 +1,16 @@ #!/bin/bash # This test will download and install git using pyapt. +if [ "$1" == "--no-progress-bar" ]; then + remove_progress_bar="--no-progress-bar" +else + remove_progress_bar="" +fi # remove git so we can install it later apt-get remove git -y && apt-get autoremove -y # download the package, it will create a file called git.tar.gz -python main.py --sources-list /etc/apt/sources.list git +python main.py --sources-list /etc/apt/sources.list $remove_progress_bar git # extract the contents of the file tar -xvf git.tar.gz