-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Migrate to GitHub Actions * Fix environment file name * Quiet conda * Success message * Exclude versioneer from flake8
- Loading branch information
1 parent
84ca438
commit 9f3fc1d
Showing
6 changed files
with
113 additions
and
55 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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,57 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: ["3.7", "3.8"] | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Conda Environment | ||
uses: goanpeca/setup-miniconda@v1.7.0 | ||
with: | ||
miniconda-version: "latest" | ||
python-version: ${{ matrix.python-version }} | ||
environment-file: ci/environment-${{ matrix.python-version }}.yml | ||
activate-environment: dask-cloudprovider-test | ||
auto-activate-base: false | ||
|
||
- name: Install | ||
shell: bash -l {0} | ||
run: pip install -e .[all] | ||
|
||
- name: Run tests | ||
shell: bash -l {0} | ||
run: py.test dask_cloudprovider | ||
|
||
lint: | ||
name: "pre-commit hooks" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: pre-commit/action@v2.0.0 | ||
|
||
imports: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Conda Environment | ||
uses: goanpeca/setup-miniconda@v1.7.0 | ||
with: | ||
miniconda-version: "latest" | ||
python-version: "3.7" | ||
|
||
- name: Run import tests | ||
shell: bash -l {0} | ||
run: source ci/scripts/test_imports.sh |
This file contains 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
This file contains 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,32 @@ | ||
name: dask-cloudprovider-test | ||
channels: | ||
- defaults | ||
- conda-forge | ||
dependencies: | ||
- python=3.8 | ||
- nomkl | ||
- pip | ||
# testing / CI | ||
- flake8 | ||
- ipywidgets | ||
- pytest | ||
- black >=20.8b1 | ||
- pyyaml | ||
# dask dependencies | ||
- cloudpickle | ||
- toolz | ||
- cytoolz | ||
- numpy | ||
- partd | ||
# distributed dependencies | ||
- click >=6.6 | ||
- msgpack-python | ||
- psutil >=5.0 | ||
- six | ||
- sortedcontainers !=2.0.0,!=2.0.1 | ||
- tblib | ||
- tornado >=5 | ||
- zict >=0.1.3 | ||
- pip: | ||
- git+https://github.com/dask/dask | ||
- git+https://github.com/dask/distributed |
This file contains 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 @@ | ||
#!/usr/bin/env bash | ||
set -o errexit | ||
|
||
|
||
test_import () { | ||
echo "Create environment: python=3.7 $1" | ||
# Create an empty environment | ||
conda create -q -y -n test-imports -c conda-forge python=3.7 | ||
conda activate test-imports | ||
pip install -e .[$1] | ||
echo "python -c '$2'" | ||
python -c "$2" | ||
echo "Success [$1] 🚀" | ||
conda deactivate | ||
conda env remove -n test-imports | ||
} | ||
|
||
test_import "aws" "import dask_cloudprovider.aws" | ||
test_import "azure" "import dask_cloudprovider.azure" | ||
test_import "digitalocean" "import dask_cloudprovider.digitalocean" |
This file contains 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