Skip to content

Nightly unit tests, windows #720

Nightly unit tests, windows

Nightly unit tests, windows #720

name: Nightly unit tests, windows
on:
schedule:
- cron: '0 7 * * *'
jobs:
win_unit_tests:
if: github.repository_owner == 'alteryx'
name: Nightly ${{ matrix.python_version }} windows ${{ matrix.command}}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python_version: ['3.8']
command: ['git-test-automl', 'git-test-modelunderstanding', 'git-test-other', 'git-test-parallel', 'git-test-prophet']
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:
repository: ${{ github.repository }}
ref: main
- 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
- 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' }}
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' }}
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}}
- name: Notify on Slack
uses: 8398a7/action-slack@v3
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
job_name: Nightly ${{ matrix.python_version }} windows ${{ matrix.command}}
status: ${{ job.status }}
fields: workflow,job,took
mention: channel
if_mention: failure,cancelled
text: ':elmofire:'
if: failure()