-
Notifications
You must be signed in to change notification settings - Fork 19
51 lines (51 loc) · 1.5 KB
/
tests.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
name: Tests
on:
push:
branches: ["*"]
pull_request:
branches: ["dependabot/**"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Get Python version from Pipfile
run: echo "PYTHON_VERSION=$(grep "python_full_version" Pipfile | cut -d ' ' -f 3 - | tr -d '"')" >> $GITHUB_ENV
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install pipenv
pipenv install --dev
- name: Build
run: |
make
- name: Tests with coverage report
env:
FEATKEY: ${{ secrets.TEST_FEAT_KEY }}
run: |
pipenv run bash -c "make coverage"
pipenv run bash -c "coverage xml"
- name: Upload Collectinfo for Debugging
if: failure()
uses: actions/upload-artifact@v4
with:
name: test_collectinfo
path: /tmp/asadm_test*
if-no-files-found: error
- name: Upload Health Struct for Debugging
if: failure()
uses: actions/upload-artifact@v4
with:
name: health_files
path: "*_health_input.txt"
if-no-files-found: error
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
with:
files: coverage.xml
fail_ci_if_error: false