-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (49 loc) · 1.52 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
53
54
55
# 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" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install test dependencies
run: |
pip install -e .[test]
- name: Test
run: |
coverage run -m nose2 --pretty-assert concat.tests
- name: Collect coverage into one file
# https://stackoverflow.com/a/58859404
if: always()
run: |
coverage combine
coverage xml
coverage lcov
- name: Report test coverage to DeepSource
if: always()
uses: deepsourcelabs/test-coverage-action@master
with:
key: python
coverage-file: coverage.xml
dsn: ${{ secrets.DEEPSOURCE_DSN }}
- name: Coveralls
if: always()
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/coverallsapp/github-action/issues/55#issuecomment-1137870701
git-commit: ${{ github.event.pull_request.head.sha }}
path-to-lcov: ./coverage.lcov