Preparing for v1 #55
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: "3.9" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install poetry | |
| - name: Run setup script | |
| run: | | |
| /bin/bash .devcontainer/setup.sh ${{ github.workspace }} | |
| - name: Run unit tests | |
| run: | | |
| cdir=$(pwd) | |
| cd $HOME/lnbits | |
| poetry_env_path=$(poetry env info --path) | |
| source $poetry_env_path/bin/activate | |
| pip install pytest-asyncio | |
| cd $cdir | |
| pytest tests/unit/*.py -s | |
| - name: Setup integration tests | |
| run: | | |
| export HEADLESS=1 | |
| bash tests/integration/start.sh | |
| - name: Run integration tests | |
| run: | | |
| cdir=$(pwd) | |
| cd $HOME/lnbits | |
| poetry_env_path=$(poetry env info --path) | |
| source $poetry_env_path/bin/activate | |
| pip install pytest-asyncio | |
| cd $cdir | |
| pytest tests/integration/*.py -s |