-
Notifications
You must be signed in to change notification settings - Fork 7
47 lines (40 loc) · 1.16 KB
/
python-test-release.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
# This workflows will test the released version of the API
name: Python Test Scheduled
on:
release:
types: [created, edited]
schedule:
- cron: '30 8 * * 1'
discussion:
types: [created, edited, pinned]
issues:
types: [opened, edited, reopened, closed]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U pytest pytest-cov
pip install howlongtobeatpy
- name: Test
run: pytest --cov=howlongtobeatpy --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: SonarCloud Scan
uses: sonarsource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}