Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 14 additions & 27 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
name: Coverage

on:
push:
branches: main
pull_request:
branches: "*"

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]

env:
OS: ubuntu-latest
PYTHON: '3.9'
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v2
id: setup-python
with:
python-version: ${{ matrix.python-version }}
python-version: "3.9"
- uses: snok/install-poetry@v1
with:
virtualenvs-create: true
Expand All @@ -28,30 +26,19 @@ jobs:
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-test-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: |
make install-test
- name: Get Bitwarden Secrets
uses: bitwarden/sm-action@v1
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
6b0baeba-4bd1-4c7d-b0c4-b0850005549d > BW_SECRET_1
- name: Configure 1Password Service Account
uses: 1password/load-secrets-action/configure@v1
with:
service-account-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
- name: Load secret
uses: 1password/load-secrets-action@v1
env:
OP_SECRET: op://app-cicd/"Better-Than-Bitwarden?"/Password
make install-test
- name: Run Coverage
run: |
make test
pip install coverage
pip install pytest
poetry add coverage codecov
make coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
12 changes: 12 additions & 0 deletions tests/test_cov.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# import os
# from pathlib import Path
# from modelscan.modelscan import Modelscan


def test_coverage() -> None:
# try:
# ms = Modelscan()
# ms.scan_path(Path(""))
# except Exception:
# pass
pass