fixes a timeout error + changes to CommandResult #45
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: dar-backup.py | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
python3-unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
# From: https://lannonbr.com/blog/2019-12-09-git-commit-in-actions | |
# setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default | |
- name: setup git config | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
- name: Install required packages | |
run: sudo apt install -y dar dar-static par2 git python3 python3-venv | |
- name: Install virtualenv, build and install the dar-backup package | |
run: | | |
cd $GITHUB_WORKSPACE/v2 | |
python3 -m venv venv | |
. venv/bin/activate | |
python3 -m pip install --upgrade pip | |
python3 -m pip install wheel build pytest hatchling hatch | |
python3 -m build | |
pip3 install . | |
- name: Run pytest | |
run: | | |
cd $GITHUB_WORKSPACE/v2 | |
export PYTHONPATH=$GITHUB_WORKSPACE/v2 | |
if [[ -z "$VIRTUAL_ENV" ]]; then | |
. venv/bin/activate | |
fi | |
pytest tests/ | |