Skip to content

Commit

Permalink
Consolidate CI and make it run on PRs from forks
Browse files Browse the repository at this point in the history
  • Loading branch information
almahmoud authored and almahmoud committed Jun 4, 2021
1 parent 91d395b commit 6b5dc39
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 72 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/cvmfs-test.yaml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/linting.yaml

This file was deleted.

69 changes: 66 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
name: CVMFS-disabled deployment test on K3S
name: Linting and deployment tests (w/ & w/out CVMFS) on K3S
on:
push: {}
push:
branches:
- master
- anvil
pull_request: {}
jobs:
linting:
runs-on: ubuntu-latest
steps:
- name: Install Kubectl
run: curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" && chmod +x ./kubectl && sudo mv ./kubectl /usr/local/bin/kubectl && kubectl version || true
- name: Install Helm
run: curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Helm dep update
run: cd galaxy/ && helm dep update && cd ..
- name: Helm linting
run: helm lint galaxy/
test:
runs-on: ubuntu-latest
steps:
Expand All @@ -19,7 +40,6 @@ jobs:
uses: jupyterhub/action-k3s-helm@v1
with:
k3s-version: v1.19.10+k3s1 # releases: https://github.com/k3s-io/k3s/tags

- name: Verify function of k8s, kubectl, and helm
run: |
echo "kubeconfig: $KUBECONFIG"
Expand All @@ -44,3 +64,46 @@ jobs:
- name: Print workflow handler log
run: bash -c "kubectl logs -n galaxy $(kubectl -n galaxy get pods | grep -o '[^ ]*galaxy-workflow[^ ]*')"
if: always()
cvmfstest:
runs-on: ubuntu-latest
steps:
- name: Install Helm
run: curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Helm dep update
run: cd galaxy/ && helm dep update && cd ..
- name: Start k8s locally
uses: jupyterhub/action-k3s-helm@v1
with:
k3s-version: v1.19.10+k3s1 # releases: https://github.com/k3s-io/k3s/tags

- name: Verify function of k8s, kubectl, and helm
run: |
echo "kubeconfig: $KUBECONFIG"
kubectl version
kubectl get pods --all-namespaces
helm version
helm list
- name: Helm repo add galaxy
run: helm repo add galaxy https://github.com/CloudVE/helm-charts/raw/master
- name: Helm install Galaxy
run: time bash -c 'helm install --create-namespace -n galaxy galaxy ./galaxy --set persistence.accessMode="ReadWriteOnce" --set persistence.size="5Gi" --set cvmfs.enabled=true --set cvmfs.deploy=true --set cvmfs.cache.preload.enabled=false --set cvmfs.cache.alienCache.enabled=false --set cvmfs.cache.localCache.enabled=true --set postgresql.deploy=true --set resources.requests.memory=0Mi,resources.requests.cpu=0m --set initJob.downloadToolConfs.enabled=false --set cvmfs.repositories.cvmfs-gxy-cloud=cloud.galaxyproject.org --set cvmfs.galaxyPersistentVolumeClaims.cloud.storage=1Gi --set cvmfs.galaxyPersistentVolumeClaims.cloud.storageClassName=cvmfs-gxy-cloud --set cvmfs.galaxyPersistentVolumeClaims.cloud.mountPath=/cvmfs/cloud.galaxyproject.org --wait --timeout=600s'
- name: Get events
run: kubectl get events -n galaxy; kubectl get events -n csi-drivers
if: always()
- name: Print web handler log
run: bash -c "kubectl logs -n galaxy $(kubectl -n galaxy get pods | grep -o '[^ ]*galaxy-web[^ ]*')"
if: always()
- name: Print job handler log
run: bash -c "kubectl logs -n galaxy $(kubectl -n galaxy get pods | grep -o '[^ ]*galaxy-job[^ ]*')"
if: always()
- name: Print workflow handler log
run: bash -c "kubectl logs -n galaxy $(kubectl -n galaxy get pods | grep -o '[^ ]*galaxy-workflow[^ ]*')"
if: always()

0 comments on commit 6b5dc39

Please sign in to comment.