Skip to content

Commit

Permalink
Switch CircleCI for GitHub Actions (#253)
Browse files Browse the repository at this point in the history
* 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
jacobtomlinson authored Jun 2, 2020
1 parent 5f3b4a9 commit 4a88095
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 40 deletions.
33 changes: 0 additions & 33 deletions .circleci/config.yml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/ci.yaml
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
9 changes: 2 additions & 7 deletions ci/Dockerfile
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.

0 comments on commit 4a88095

Please sign in to comment.