-
Notifications
You must be signed in to change notification settings - Fork 87
80 lines (79 loc) · 2.68 KB
/
linux_unit_tests_with_latest_deps.yaml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Unit tests, linux, latest dependencies
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
workflow_dispatch:
jobs:
unit_tests:
name: ${{ matrix.python_version }} unit ${{matrix.command}} tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python_version: "3.9"
command: 'git-test-automl'
- python_version: "3.8"
command: 'git-test-automl'
- python_version: "3.8"
command: 'git-test-prophet'
- python_version: "3.8"
command: 'git-test-modelunderstanding'
- python_version: "3.8"
command: 'git-test-other'
- python_version: "3.8"
command: 'git-test-parallel'
steps:
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 2
- name: Update apt and install Graphviz
run: sudo apt update && sudo apt install -y graphviz
- if: ${{ matrix.command == 'git-test-modelunderstanding' || matrix.command == 'git-test-other' || matrix.command == 'git-test-parallel' }}
name: Installing Dependencies
run: |
pip install virtualenv
virtualenv test_python -q
source test_python/bin/activate
make installdeps
make installdeps-test
pip freeze
- if: ${{ matrix.command == 'git-test-automl' || matrix.command == 'git-test-prophet' }}
name: Installing Dependencies and Prophet
run: |
pip install virtualenv
virtualenv test_python -q
source test_python/bin/activate
make installdeps-prophet
make installdeps-test
pip freeze
- name: Erase Coverage
run: |
source test_python/bin/activate
coverage erase
- name: Run unit tests
run: |
source test_python/bin/activate
make ${{matrix.command}}
- name: Upload pytest duration artifact
uses: actions/upload-artifact@v2
with:
name: pytest-duration-report
path: test-reports/${{matrix.command}}-junit.xml
- name: install coverage
run: pip install "coverage[toml]"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true