Skip to content

Commit

Permalink
ci: added git download and install test to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
RonTamG committed Nov 11, 2023
1 parent 859eba1 commit 267a354
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/python-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ permissions:

jobs:
test:
runs-on: windows-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
Expand All @@ -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
Expand Down
7 changes: 6 additions & 1 deletion tests/acceptance_tests/install_git.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 267a354

Please sign in to comment.