Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tarpas committed Apr 1, 2022
1 parent 82490b7 commit 407c060
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 150 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/cancel.yml

This file was deleted.

158 changes: 26 additions & 132 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,98 +9,12 @@ on:
- main

jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- id: file_changes
uses: trilom/[email protected]
with:
output: " "
- name: List changed files
run: echo '${{ steps.file_changes.outputs.files}}'
- uses: pre-commit/[email protected]
with:
extra_args: --files ${{ steps.file_changes.outputs.files}}
- name: Check for missing init files
run: build_tools/fail_on_missing_init_files.sh
shell: bash

run-notebook-examples:
needs: code-quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[all_extras,binder,dev]
- name: Run example notebooks
run: build_tools/run_examples.sh
shell: bash

test-windows:
needs: code-quality
runs-on: windows-2019
strategy:
matrix:
python-version: [3.7, 3.8]
steps:
- uses: actions/checkout@v2

- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: anaconda, conda-forge,

- run: conda --version
- run: which python

- name: Fix windows paths
if: ${{ runner.os == 'Windows' }}
run: echo "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Install conda libpython
run: conda install -c anaconda libpython

- name: Install conda dependencies
run: |
conda install -c anaconda "pystan==2.19.1.1"
conda install -c conda-forge "prophet>=1.0"
conda install -c conda-forge scipy matplotlib
- name: Install sktime and dependencies
run: python -m pip install .[all_extras,dev]

- name: Show dependecies
run: python -m pip list

- name: Run tests
run: |
mkdir -p testdir/
cp .coveragerc testdir/
cp setup.cfg testdir/
cd testdir/
python -m pytest --showlocals --durations=10 --cov-report=xml --cov=sktime -v -n 2 --pyargs sktime
- name: Display coverage report
run: ls -l ./testdir/
- name: Publish code coverage
uses: codecov/codecov-action@v1
with:
file: ./testdir/coverage.xml

test-linux:
needs: code-quality
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand All @@ -110,64 +24,44 @@ jobs:
- name: Display Python version
run: python -c "import sys; print(sys.version)"

- name: Install sktime and dependencies
run: |
python -m pip install .[all_extras,dev]
- name: Show dependecies
run: python -m pip list

- name: Run tests
run: make tests

- name: Display coverage report
run: ls -l ./testdir/
- name: Publish code coverage
uses: codecov/codecov-action@v1
- uses: syphar/restore-virtualenv@v1
with:
file: ./testdir/coverage.xml
requirement_files: pyproject.toml

test-mac:
needs: code-quality
runs-on: macOS-10.15
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- uses: pat-s/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"

# - run: brew install libomp
path: .tmnetdata
key: testmon=${{ matrix.python-version }}-${{ github.run_id }}.${{ github.run_number }}
restore-keys: testmon=${{ matrix.python-version }}

# - name: Set env vars
# run: |
# echo "CC=/usr/bin/clang++" >> $GITHUB_ENV
# echo "CXX=/usr/bin/clang++" >> $GITHUB_ENV
# echo "DYLD_LIBRARY_PATH=/usr/local/opt/libomp/lib" >> $GITHUB_ENV
# echo "CPPFLAGS=$CPPFLAGS -Xclang -fopenmp -std=c++11 -lstdc++" >> $GITHUB_ENV
# echo "CFLAGS=$CFLAGS -I/opt/local/include/libomp -I/opt/local/include" >> $GITHUB_ENV
# echo "CXXFLAGS=$CXXFLAGS -I/opt/local/include/libomp" >> $GITHUB_ENV
# echo "LDFLAGS=$LDFLAGS -Wl,-rpath,/opt/local/lib/libomp -L/opt/local/lib/libomp -lomp" >> $GITHUB_ENV
# echo "PATH=/usr/local/opt/ccache/libexec:$PATH" >> $GITHUB_ENV
- name: check .tmnetdata 1
run: |
find . -name ".tmnetdata"
- name: Install sktime and dependencies
run: |
python -m pip install .[all_extras,dev]
python -m pip install ${{ secrets.TMNETDL }}/pytest-tmnet-1.3.2.tar.gz
pip install py-spy
- name: Show dependecies
run: python -m pip list

- name: Run tests
run: make tests

- name: Display coverage report
run: ls -l ./testdir/
- name: Publish code coverage
uses: codecov/codecov-action@v1
- name: check .tmnetdata 2
run: |
find . -name ".tmnetdata"
- uses: actions/upload-artifact@v3
with:
file: ./testdir/coverage.xml
name: data
path: .tmnetdata

# - name: Display coverage report
# run: ls -l ./testdir/
# - name: Publish code coverage
# uses: codecov/codecov-action@v1
# with:
# file: ./testdir/coverage.xml
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ install: ## Install for the current user using the default python command
python3 setup.py build_ext --inplace && python setup.py install --user

test: ## Run unit tests
-rm -rf ${TEST_DIR}
mkdir -p ${TEST_DIR}
cp .coveragerc ${TEST_DIR}
cp setup.cfg ${TEST_DIR}
cd ${TEST_DIR}; python -m pytest --cov-report html --cov=sktime -v -n 2 --showlocals --durations=20 --pyargs $(PACKAGE)
/home/runner/.virtualenvs/.venv/bin/python -m pytest --tmnet -n 2 -v --showlocals --durations=20 sktime
ls -al .*data

tests: test

Expand Down

0 comments on commit 407c060

Please sign in to comment.