From a3619261f5a272008c8bb3efbaae8b0e483cb07e Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Fri, 30 Sep 2022 13:47:20 -0700 Subject: [PATCH] Try running CLI tests in GitHub Actions, and disabling CircleCI --- {.circleci => .circleci.bak}/config.yml | 0 .github/workflows/tests.yml | 28 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) rename {.circleci => .circleci.bak}/config.yml (100%) create mode 100644 .github/workflows/tests.yml diff --git a/.circleci/config.yml b/.circleci.bak/config.yml similarity index 100% rename from .circleci/config.yml rename to .circleci.bak/config.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..899b12b1 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,28 @@ +name: Run Tests +run-name: Run tests 🚀 +on: [push] +jobs: + test-cli: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get -y install tor obfs4proxy + pip install --upgrade pip poetry + - uses: actions/cache@v3 + with: + path: ~/.cache/pypoetry/virtualenvs + key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-cli-poetry-${{ hashFiles('cli/poetry.lock') }} + - run: cd cli && poetry install + - run: | + cd cli + poetry run pytest -v ./tests + poetry run onionshare-cli --local-only ./tests --auto-stop-timer 2 + poetry run onionshare-cli --local-only --receive --auto-stop-timer 2 + poetry run onionshare-cli --local-only --website ../docs --auto-stop-timer 2 + poetry run onionshare-cli --local-only --chat --auto-stop-timer 2