style: format code with isort and Yapf #283
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: Python application | |
on: | |
push: | |
branches: [master, develop] | |
pull_request: | |
branches: [master, develop] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
operating-system: ["ubuntu-latest"] | |
runs-on: ${{ matrix.operating-system }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v30 | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: devenv | |
- name: Install devenv.sh | |
run: nix profile install nixpkgs#devenv | |
- name: Run tests | |
shell: devenv shell bash -e {0} | |
run: | | |
uv sync | |
uv pip install onnxruntime>=1.8.0 deepsparse>=1.4.0 | |
uv run coverage run --source=hsf -m pytest | |
uv run coverage xml | |
- name: Publish Coverage on CodeClimate | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
with: | |
coverageLocations: | | |
${{ github.workspace }}/coverage.xml:coverage.py | |
debug: true | |
- name: Publish Coverage on Codacy | |
uses: codacy/[email protected] | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
api-token: ${{ secrets.CODACY_API_TOKEN }} | |
coverage-reports: ${{ github.workspace }}/coverage.xml |