release: 1.29.1.0 #63
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
name: Clojure With Minikube | |
on: | |
push: | |
branches: [ "master", "devel" ] | |
pull_request: | |
branches: [ "master", "devel" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
################################### | |
# Setup Minikube | |
################################### | |
- name: Setup Minikube | |
uses: medyagh/setup-minikube@latest | |
with: | |
minikube version: 'v1.30.1' | |
kubernetes-version: '1.26.3' | |
- name: Setup Minikube Env for test #1 | |
run: kubectl -n kube-system create serviceaccount toast | |
- name: Setup Minikube Env for test #2 | |
run: kubectl -n kube-system create clusterrolebinding toast-bind --clusterrole=cluster-admin --serviceaccount=kube-system:toast | |
- name: Setup Minikube Env for test #3 | |
run: echo "KUBERNETES_TOKEN=$(kubectl -n kube-system create token toast)" >> $GITHUB_ENV | |
################################### | |
# Clojure Tests | |
################################### | |
- name: Install dependencies | |
run: lein deps | |
- name: Run tests | |
run: lein test | |
################################### | |
# Code Coverage | |
################################### | |
- name: Generate Coverage Report | |
if: github.ref == 'refs/heads/master' | |
run: lein cloverage --coveralls -o cov | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }} | |
# - name: Coveralls | |
# if: github.ref == 'refs/heads/master' | |
# uses: coverallsapp/github-action@v2 | |
# with: | |
# base-path: cov/ | |
################################### | |
# Generate release | |
################################### | |
- name: Deploy to Clojars | |
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/devel' | |
run: lein deploy | |
env: | |
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }} | |
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }} | |
################################### | |
# Generate Documentation | |
################################### | |
- name: Generate documentation | |
if: github.ref == 'refs/heads/master' | |
# Remove stubs | |
run: lein marg -e src/kubernetes -d public -f index.html | |
- name: Deploy documentation to Github Pages | |
uses: JamesIves/[email protected] | |
if: github.ref == 'refs/heads/master' | |
with: | |
branch: gh-pages | |
folder: public |