This repository has been archived by the owner on Oct 17, 2024. It is now read-only.
Added more unit tests #34
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
### 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.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
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 | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
strategy: | |
matrix: | |
python-version: [3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
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 |