Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Added unittest

Added unittest #2

Workflow file for this run

### A CI workflow template that runs linting and python testing
### TODO: Modify as needed or as desired.
name: Test tap-sharepointsites
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
linting:
runs-on: ubuntu-latest
strategy:
matrix:
# Only lint using the primary version used for dev
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry==1.2.*
pip install tox
- name: Run lint command from tox.ini
run: |
poetry run tox -e lint
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply code formatting
pytest:
runs-on: ubuntu-latest
needs: linting
strategy:
max-parallel: 5
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry==1.2.*
- name: Install dependencies
run: |
poetry install
- name: Test with pytest
run: |
poetry run pytest --capture=no