-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (28 loc) · 949 Bytes
/
python-app.yml
File metadata and controls
33 lines (28 loc) · 949 Bytes
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
# 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: Switcharoohelper Unit Tests
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip poetry
poetry install
sudo apt install -y jq
- name: Run test
run: |
poetry run pytest --cov=switcharoo
poetry run coverage json -o /dev/stdout | jq .totals.percent_covered | awk '{print int($1+0.5)}' > total_coverage.txt
- name: Upload Coverage
uses: actions/upload-artifact@v3
with:
name: coverage_data
path: total_coverage.txt