-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch CircleCI for GitHub Actions (#253)
* Switch CircleCI for GitHub Actions * Build docker image and push to kind * Move k8s resources and add tests * Fix YAML * Add linting workflow and tidy tests * Reinstate interactive tty
- Loading branch information
1 parent
5f3b4a9
commit 4a88095
Showing
4 changed files
with
64 additions
and
40 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,62 @@ | ||
name: "CI" | ||
on: [pull_request, push] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e . | ||
pip install -r requirements-dev.txt | ||
- name: Lint | ||
run: | | ||
flake8 dask_kubernetes | ||
black --check dask_kubernetes setup.py | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Install and start kind (Kubernetes in Docker) | ||
uses: engineerd/[email protected] | ||
|
||
- name: Get kind info | ||
run: | | ||
kubectl cluster-info | ||
kubectl get pods -n kube-system | ||
echo "current-context:" $(kubectl config current-context) | ||
echo "environment-kubeconfig:" ${KUBECONFIG} | ||
- name: Build testing Docker image | ||
run: | | ||
docker build -t dask-kubernetes:test -f ci/Dockerfile . | ||
kind load docker-image dask-kubernetes:test | ||
- name: Create test runner k8s resources | ||
run: | | ||
kubectl apply -f ci/test-runner-setup.yaml | ||
- name: Run tests inside container | ||
run: | | ||
kubectl -n dask-kubernetes-test \ | ||
run -i --tty --restart=Never \ | ||
dask-kubernetes-test \ | ||
--serviceaccount=test-runner \ | ||
--image=dask-kubernetes:test \ | ||
--image-pull-policy=Never \ | ||
--env="USER=tester" \ | ||
--env="K8S_TEST_NAMESPACE=dask-kubernetes-test" \ | ||
--env="EXTRA_TEST_ARGS=--in-cluster" \ | ||
--rm=true \ | ||
--command -- py.test dask_kubernetes -vvv --namespace=dask-kubernetes-test --worker-image=dask-kubernetes:test |
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 |
---|---|---|
@@ -1,11 +1,6 @@ | ||
FROM daskdev/dask:latest | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
make \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /usr/local/src/dask_kubernetes | ||
WORKDIR /usr/local/src | ||
COPY . . | ||
|
||
RUN make install | ||
RUN pip install -e . && pip install -r requirements-dev.txt |
File renamed without changes.