Try running CLI tests in GitHub Actions, and disabling CircleCI

This commit is contained in:
Micah Lee 2022-09-30 13:47:20 -07:00
parent d945f4c37a
commit a3619261f5
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
2 changed files with 28 additions and 0 deletions

28
.github/workflows/tests.yml vendored Normal file
View file

@ -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