-
Notifications
You must be signed in to change notification settings - Fork 86
85 lines (83 loc) · 3.36 KB
/
windows_unit_tests.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
81
82
83
84
85
name: Unit tests, windows
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
jobs:
win_unit_tests:
name: ${{ matrix.python_version }} windows ${{ matrix.command}}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python_version: ['3.9']
command: ['git-test-automl', 'git-test-modelunderstanding', 'git-test-parallel', 'git-test-prophet-no-parallel-cpu', 'git-test-other-no-parallel-cpu']
steps:
- name: Download Miniconda
shell: pwsh
run: |
$File = "Miniconda3-4.7.12.1-Windows-x86_64.exe"
$Uri = "https://repo.anaconda.com/miniconda/$File"
$ProgressPreference = "silentlyContinue"
Invoke-WebRequest -Uri $Uri -Outfile "$env:USERPROFILE/$File"
$hashFromFile = Get-FileHash "$env:USERPROFILE/$File" -Algorithm SHA256
$hashFromUrl = "f18060cc0bb50ae75e4d602b7ce35197c8e31e81288d069b758594f1bb46ab45"
if ($hashFromFile.Hash -ne "$hashFromUrl") {
Throw "File hashes did not match!"
}
- name: Install Miniconda
shell: cmd
run: start /wait "" %UserProfile%\Miniconda3-4.7.12.1-Windows-x86_64.exe /InstallationType=JustMe /RegisterPython=0 /AddToPath=1 /S /D=%UserProfile%\Miniconda3
- name: Set Python ${{ matrix.python_version }} Version
shell: pwsh
run: |
. $env:USERPROFILE\Miniconda3\shell\condabin\conda-hook.ps1
conda create -n curr_py python=${{ 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 }}
- name: Install make
run: |
. $env:USERPROFILE\Miniconda3\shell\condabin\conda-hook.ps1
conda config --add channels conda-forge
conda activate curr_py
conda install make -q -y
- name: Install Graphviz
run: |
. $env:USERPROFILE\Miniconda3\shell\condabin\conda-hook.ps1
conda activate curr_py
conda config --add channels conda-forge
conda install -q -y -c conda-forge python-graphviz graphviz=9.0.0 pango=1.52.2
- name: Install numba (for shap)
run: |
. $env:USERPROFILE\Miniconda3\shell\condabin\conda-hook.ps1
conda activate curr_py
conda install numba -q -y
- if: ${{ matrix.command == 'git-test-prophet-no-parallel-cpu' }}
name: Install EvalML with test requirements and prophet
shell: pwsh
run: |
. $env:USERPROFILE\Miniconda3\shell\condabin\conda-hook.ps1
conda activate curr_py
python -m pip install --upgrade pip
python -m pip install .[test]
python -m pip install .[prophet]
pip freeze
- if: ${{ matrix.command != 'git-test-prophet-no-parallel-cpu' }}
name: Install EvalML with test requirements
shell: pwsh
run: |
. $env:USERPROFILE\Miniconda3\shell\condabin\conda-hook.ps1
conda activate curr_py
python -m pip install --upgrade pip
python -m pip install .[test]
pip freeze
- name: Run unit tests
run: |
. $env:USERPROFILE\Miniconda3\shell\condabin\conda-hook.ps1
conda activate curr_py
make ${{matrix.command}}