-
-
Notifications
You must be signed in to change notification settings - Fork 89
54 lines (49 loc) · 1.43 KB
/
pytest.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
# SPDX-FileCopyrightText: 2023 Marlon W (Mawoka)
#
# SPDX-License-Identifier: MPL-2.0
# .github/workflows/app.yaml
name: PyTest
on:
push:
paths:
- "classquiz/**"
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install pipenv
run: pipx install pipenv
# Setup Python (faster than using Python container)
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pipenv'
- run: pipenv install --dev
- name: Prepare tests
run: |
echo ${{ secrets.DOTENV }} | base64 --decode > .env
set -o allexport; source .env; set +o allexport
chmod +x run_tests.sh
- name: Run tests
run: |
./run_tests.sh a
pipenv run coverage xml
# - name: Report results to DeepSource
# run: |
# # Install deepsource CLI
# curl https://deepsource.io/cli | sh
#
# # From the root directory, run the report coverage command
# ./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml
#
# env:
# DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml