-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (36 loc) · 1.12 KB
/
01_test.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
name: Build
on:
push:
branches: [ main, dev ]
schedule:
- cron: '0 0 * * *' # Runs at midnight UTC daily
jobs:
build:
runs-on: ubuntu-latest # Simplified as matrix.os isn't used
steps:
- uses: actions/checkout@v2
- name: List directory contents
run: ls -la
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test and generate coverage report
run: |
pip install pytest
pip install pytest-cov
pytest --cov=./ --cov-report=xml
# Optional: Upload coverage to Codecov if desired
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v2
# with:
# file: ./coverage.xml
# fail_ci_if_error: true
- name: Notify on failure
if: failure() # This step will only run if any previous step fails
run: |
echo "Build or tests failed. Please check the logs."