Fixes the SDK to support the new scan schedule (#111) #234
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
zanshinsdk_jobs: | |
strategy: | |
matrix: | |
python-version: [ 3.8, 3.9, "3.10", 3.11 ] | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
name: Test and Coverage | |
timeout-minutes: 10 | |
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 | |
uses: snok/install-poetry@v1.3.3 | |
with: | |
version: 1.3.2 | |
virtualenvs-create: false | |
virtualenvs-in-project: false | |
- name: Install dependencies | |
run: poetry install | |
- name: Run pre-commit command | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
poetry run pre-commit autoupdate | |
poetry run pre-commit run --all-files | |
- name: Unit test | |
run: | | |
poetry run python -m unittest discover -v | |
- name: Test coverage | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
make coverage | |
- name: Coverage comment | |
id: coverage_comment | |
uses: ewjoachim/python-coverage-comment-action@v2 | |
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true' && matrix.os == 'ubuntu-latest' | |
with: | |
GITHUB_TOKEN: ${{ github.token }} | |
VERBOSE: true | |
MINIMUM_GREEN: 90 | |
MINIMUM_ORANGE: 60 | |
- name: Store Pull Request comment to be posted | |
uses: actions/upload-artifact@v2 | |
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true' && matrix.os == 'ubuntu-latest' | |
with: | |
# If you use a different name, update COMMENT_ARTIFACT_NAME accordingly | |
name: python-coverage-comment-action | |
# If you use a different name, update COMMENT_FILENAME accordingly | |
path: python-coverage-comment-action.txt |