-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.16 KB
/
Copy pathpytest.yml
File metadata and controls
44 lines (42 loc) · 1.16 KB
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
name: Pytest
on:
pull_request:
branches: [ "develop", "main" ]
jobs:
build:
name: Run Pytest check
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
mkdir -p ./log
touch ./log/test.log
cp ./.env.example ./.env
pip install -r ./requirements.txt
- name: Testing the code with Pytest
run: |
./scripts/run_pytest
- name: Get Cover
uses: orgoro/coverage@v3
with:
coverageFile: coverage/report.xml
token: ${{ secrets.GITHUB_TOKEN }}
- name: Coverage Badge
uses: tj-actions/coverage-badge-py@v2
- name: Deploy Coverage Badge to gist
uses: exuanbo/actions-deploy-gist@v1
with:
token: ${{ secrets.TOKEN }}
gist_id: 484e36769fa2cd1637e7aed39aedc5a4
file_path: coverage.svg
file_type: binary