-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (43 loc) · 1.53 KB
/
python-app.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# 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