Skip to content

Commit 9f3fc1d

Browse files
Migrate to GitHub Actions (#155)
* Migrate to GitHub Actions * Fix environment file name * Quiet conda * Success message * Exclude versioneer from flake8
1 parent 84ca438 commit 9f3fc1d

File tree

6 files changed

+113
-55
lines changed

6 files changed

+113
-55
lines changed

.circleci/config.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
os: ["ubuntu-latest"]
12+
python-version: ["3.7", "3.8"]
13+
14+
steps:
15+
- name: Checkout source
16+
uses: actions/checkout@v2
17+
18+
- name: Setup Conda Environment
19+
uses: goanpeca/[email protected]
20+
with:
21+
miniconda-version: "latest"
22+
python-version: ${{ matrix.python-version }}
23+
environment-file: ci/environment-${{ matrix.python-version }}.yml
24+
activate-environment: dask-cloudprovider-test
25+
auto-activate-base: false
26+
27+
- name: Install
28+
shell: bash -l {0}
29+
run: pip install -e .[all]
30+
31+
- name: Run tests
32+
shell: bash -l {0}
33+
run: py.test dask_cloudprovider
34+
35+
lint:
36+
name: "pre-commit hooks"
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v2
40+
- uses: actions/setup-python@v2
41+
- uses: pre-commit/[email protected]
42+
43+
imports:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Checkout source
47+
uses: actions/checkout@v2
48+
49+
- name: Setup Conda Environment
50+
uses: goanpeca/[email protected]
51+
with:
52+
miniconda-version: "latest"
53+
python-version: "3.7"
54+
55+
- name: Run import tests
56+
shell: bash -l {0}
57+
run: source ci/scripts/test_imports.sh

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Dask Cloud Provider
33
===================
44

55

6-
.. image:: https://img.shields.io/circleci/build/github/dask/dask-cloudprovider?logo=circleci
7-
:target: https://circleci.com/gh/dask/dask-cloudprovider
8-
:alt: CircleCI
6+
.. image:: https://github.com/dask/dask-cloudprovider/workflows/CI/badge.svg
7+
:target: https://github.com/dask/dask-cloudprovider/actions?query=workflow%3ACI
8+
:alt: Build Status
99

1010
.. image:: https://img.shields.io/readthedocs/dask-cloudprovider
1111
:target: https://cloudprovider.dask.org/

ci/environment-3.8.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: dask-cloudprovider-test
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- python=3.8
7+
- nomkl
8+
- pip
9+
# testing / CI
10+
- flake8
11+
- ipywidgets
12+
- pytest
13+
- black >=20.8b1
14+
- pyyaml
15+
# dask dependencies
16+
- cloudpickle
17+
- toolz
18+
- cytoolz
19+
- numpy
20+
- partd
21+
# distributed dependencies
22+
- click >=6.6
23+
- msgpack-python
24+
- psutil >=5.0
25+
- six
26+
- sortedcontainers !=2.0.0,!=2.0.1
27+
- tblib
28+
- tornado >=5
29+
- zict >=0.1.3
30+
- pip:
31+
- git+https://github.com/dask/dask
32+
- git+https://github.com/dask/distributed

ci/scripts/test_imports.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
set -o errexit
3+
4+
5+
test_import () {
6+
echo "Create environment: python=3.7 $1"
7+
# Create an empty environment
8+
conda create -q -y -n test-imports -c conda-forge python=3.7
9+
conda activate test-imports
10+
pip install -e .[$1]
11+
echo "python -c '$2'"
12+
python -c "$2"
13+
echo "Success [$1] 🚀"
14+
conda deactivate
15+
conda env remove -n test-imports
16+
}
17+
18+
test_import "aws" "import dask_cloudprovider.aws"
19+
test_import "azure" "import dask_cloudprovider.azure"
20+
test_import "digitalocean" "import dask_cloudprovider.digitalocean"

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# https://flake8.readthedocs.io/en/latest/user/error-codes.html
55

66
# Note: there cannot be spaces after comma's here
7-
exclude = __init__.py
7+
exclude = __init__.py,versioneer.py,dask_cloudprovider/_version.py
88
ignore =
99
# Extra space in brackets
1010
E20,

0 commit comments

Comments
 (0)