Add github action for unittest #1
Workflow file for this run
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: Python Unittest CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.5.1 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9.6" | |
cache: "poetry" | |
- name: Set up Poetry Path | |
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Install dependencies | |
run: poetry install --no-interaction | |
- name: Run unittests | |
run: poetry run python -m unittest discover -s tests |