diff --git a/.github/workflows/unittest.yaml b/.github/workflows/unittest.yaml new file mode 100644 index 0000000..42c7775 --- /dev/null +++ b/.github/workflows/unittest.yaml @@ -0,0 +1,38 @@ +name: Run Unittests + +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + export PATH="$HOME/.local/bin:$PATH" + poetry --version + + - name: Install dependencies + run: | + export PATH="$HOME/.local/bin:$PATH" + poetry install + + - name: Run tests with pytest + run: | + export PATH="$HOME/.local/bin:$PATH" + poetry run pytest tests