-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Transition from Travis CI to github workflow #1004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mfeurer
merged 12 commits into
automl:development
from
franchuterivera:github_workflow_transition
Nov 19, 2020
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d9375e5
Transition from travis
franchuterivera e8efbfe
Fix examples
franchuterivera 6ce39de
Give rerun failures a try
franchuterivera 0a9d591
Try pytest directly
franchuterivera 1fb864b
Trying to make cov work
franchuterivera a0bf1a4
removed wrong long
franchuterivera accba23
Try serial runs as before
franchuterivera 226600e
No Rerun
franchuterivera 73ade97
Incorporated PR comments
franchuterivera 19730cf
Fix conda and dist failures
franchuterivera 40e59eb
Fix flake
franchuterivera d12720b
Output check
franchuterivera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [flake8] | ||
| max-line-length = 100 | ||
| show-source = True | ||
| application-import-names = autosklearn | ||
| exclude = | ||
| venv | ||
| build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: dist-check | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
| jobs: | ||
| dist: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: 3.8 | ||
| - name: Build dist | ||
| run: | | ||
| python setup.py sdist | ||
| - name: Twine check | ||
| run: | | ||
| pip install twine | ||
| last_dist=$(ls -t dist/auto-sklearn-*.tar.gz | head -n 1) | ||
| twine_output=`twine check "$last_dist"` | ||
| if [[ "$twine_output" != "Checking $last_dist: PASSED" ]]; then echo $twine_output && exit 1;fi | ||
| - name: Install dist | ||
| run: | | ||
| last_dist=$(ls -t dist/auto-sklearn-*.tar.gz | head -n 1) | ||
| pip install $last_dist | ||
| - name: PEP 561 Compliance | ||
| run: | | ||
| pip install mypy | ||
| cd .. # required to use the installed version of autosklearn | ||
| if ! python -c "import autosklearn"; then exit 1; fi | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| name: Docs | ||
| on: [pull_request, push] | ||
|
|
||
| jobs: | ||
| build-and-deploy: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: 3.8 | ||
| - name: Install dependencies | ||
| run: | | ||
| pip install -e .[docs,examples,examples_unix] | ||
| - name: Make docs | ||
| run: | | ||
| cd doc | ||
| make html | ||
| - name: Pull latest gh-pages | ||
| if: (contains(github.ref, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push' | ||
| run: | | ||
| cd .. | ||
| git clone https://github.com/automl/auto-sklearn.git --branch gh-pages --single-branch gh-pages | ||
| - name: Copy new doc into gh-pages | ||
| if: (contains(github.ref, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push' | ||
| run: | | ||
| branch_name=${GITHUB_REF##*/} | ||
| cd ../gh-pages | ||
| rm -rf $branch_name | ||
| cp -r ../autosklearn/doc/build/html $branch_name | ||
| - name: Push to gh-pages | ||
| if: (contains(github.ref, 'develop') || contains(github.ref, 'master')) && github.event_name == 'push' | ||
| run: | | ||
| last_commit=$(git log --pretty=format:"%an: %s") | ||
| cd ../gh-pages | ||
| branch_name=${GITHUB_REF##*/} | ||
| git add $branch_name/ | ||
| git config --global user.name 'Github Actions' | ||
| git config --global user.email 'not@mail.com' | ||
| git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | ||
| git commit -am "$last_commit" | ||
| git push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| name: pre-commit | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
| jobs: | ||
| run-all-files: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Setup Python 3.7 | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: 3.7 | ||
| - name: Install pre-commit | ||
| run: | | ||
| pip install pre-commit | ||
| pre-commit install | ||
| - name: Run pre-commit | ||
| run: | | ||
| pre-commit run --all-files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| name: Tests | ||
mfeurer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| on: [push, pull_request] | ||
|
|
||
| jobs: | ||
| ubuntu: | ||
|
|
||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: [3.6, 3.7, 3.8] | ||
| use-conda: [true, false] | ||
| use-dist: [false] | ||
| include: | ||
| - python-version: 3.8 | ||
| code-cov: true | ||
| - python-version: 3.7 | ||
| use-conda: false | ||
| use-dist: true | ||
| fail-fast: false | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Setup Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Conda Install test dependencies | ||
| if: matrix.use-conda == true | ||
| run: | | ||
| # Miniconda is available in $CONDA env var | ||
| $CONDA/bin/conda create -n testenv --yes pip wheel gxx_linux-64 gcc_linux-64 swig python=${{ matrix.python-version }} | ||
| $CONDA/envs/testenv/bin/python3 -m pip install --upgrade pip | ||
| $CONDA/envs/testenv/bin/pip3 install -e .[test] | ||
| - name: Install test dependencies | ||
| if: matrix.use-conda == false && matrix.use-dist == false | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -e .[test] | ||
| sudo apt-get update | ||
| sudo apt-get remove swig | ||
| sudo apt-get install swig3.0 | ||
| sudo ln -s /usr/bin/swig3.0 /usr/bin/swig | ||
| - name: Dist Install test dependencies | ||
| if: matrix.use-conda == false && matrix.use-dist == true | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| sudo apt-get update | ||
| sudo apt-get remove swig | ||
| sudo apt-get install swig3.0 | ||
| sudo ln -s /usr/bin/swig3.0 /usr/bin/swig | ||
| # We need to install for the dependencies, like pytest | ||
| pip install -e .[test] | ||
| # Then we remove autosklearn and install from DIST | ||
| pip uninstall --yes auto-sklearn | ||
| python setup.py sdist | ||
| last_dist=$(ls -t dist/auto-sklearn-*.tar.gz | head -n 1) | ||
| pip install $last_dist | ||
mfeurer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: Conda Run tests | ||
| if: matrix.use-conda == true | ||
| run: | | ||
| export OPENBLAS_NUM_THREADS=1 | ||
| export OMP_NUM_THREADS=1 | ||
| export MKL_NUM_THREADS=1 | ||
| # We activate conda as metalearning uses python directly, so we need | ||
| # to change the default python | ||
| export PATH="$CONDA/envs/testenv/bin:$PATH" | ||
| if [ ${{ matrix.code-cov }} ]; then codecov='--cov=autosklearn --cov-report=xml'; fi | ||
| $CONDA/envs/testenv/bin/python3 -m pytest --durations=20 -sv $codecov test | ||
| - name: Run tests | ||
| if: matrix.use-conda == false | ||
| run: | | ||
| export OPENBLAS_NUM_THREADS=1 | ||
| export OMP_NUM_THREADS=1 | ||
| export MKL_NUM_THREADS=1 | ||
| if [ ${{ matrix.code-cov }} ]; then codecov='--cov=autosklearn --cov-report=xml'; fi | ||
| pytest --durations=20 -sv $codecov test | ||
mfeurer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: Upload coverage | ||
| if: matrix.code-cov && always() | ||
| uses: codecov/codecov-action@v1 | ||
| with: | ||
| fail_ci_if_error: true | ||
| verbose: true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| repos: | ||
| - repo: https://github.com/pre-commit/mirrors-mypy | ||
| rev: v0.761 | ||
| hooks: | ||
| - id: mypy | ||
| name: mypy auto-sklearn-ensembles | ||
| files: autosklearn/ensembles | ||
| - id: mypy | ||
| name: mypy auto-sklearn-metrics | ||
| files: autosklearn/metrics | ||
| - id: mypy | ||
| name: mypy auto-sklearn-data | ||
| files: autosklearn/data | ||
| - id: mypy | ||
| name: mypy auto-sklearn-util | ||
| files: autosklearn/util | ||
| - repo: https://gitlab.com/pycqa/flake8 | ||
| rev: 3.8.3 | ||
| hooks: | ||
| - id: flake8 | ||
| name: flake8 auto-sklearn | ||
| files: autosklearn/* | ||
| - id: flake8 | ||
| name: flake8 file-order-data | ||
| files: autosklearn/data | ||
| additional_dependencies: | ||
| - flake8-import-order | ||
| - id: flake8 | ||
| name: flake8 file-order-ensemble | ||
| files: autosklearn/ensembles | ||
| additional_dependencies: | ||
| - flake8-import-order | ||
| - id: flake8 | ||
| name: flake8 file-order-metrics | ||
| files: autosklearn/metrics | ||
| additional_dependencies: | ||
| - flake8-import-order | ||
| - id: flake8 | ||
| name: flake8 file-order-util | ||
| files: autosklearn/util | ||
| additional_dependencies: | ||
| - flake8-import-order | ||
| - id: flake8 | ||
| name: flake8 autosklearn-test | ||
| files: test/* |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.