CI #76
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: CI | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
on: | |
workflow_dispatch: {} | |
push: | |
# Tags should be built by CD instead | |
tags-ignore: ['*'] | |
branches: ['*'] | |
pull_request: {} | |
env: | |
REGISTRY: ghcr.io | |
# github.repository as <account>/<repo> | |
IMAGE_NAME: ${{ github.repository }} | |
HELM_REPO: "oci://ghcr.io/${{ github.repository }}/charts" | |
GO_VERSION: 1.20.4 | |
GOPRIVATE: 'github.com/meln5674/*' | |
HELM_VERSION: v3.12.0 | |
COSIGN_VERSION: v1.13.0 | |
YQ_VERSION: v4.27.2 | |
jobs: | |
lint: | |
# runs-on: ubuntu-latest | |
runs-on: self-hosted | |
permissions: | |
contents: read | |
steps: | |
# Checkout | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Install deps | |
- name: Install Helm | |
uses: azure/setup-helm@v1 | |
with: | |
version: '${{ env.HELM_VERSION }}' | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '^${{ env.GO_VERSION }}' | |
- name: Install Dependencies | |
run: | | |
make deps | |
# Run Linter | |
- name: Lint standalone chart | |
run: | | |
cd deploy/helm/mlflow-oidc-proxy | |
helm dependency update | |
helm-hog test --no-apply --batch --auto-remove-success --parallel=0 | |
- name: Lint omnibus dependencies chart | |
run: | | |
cd deploy/helm/mlflow-multitenant-deps | |
helm lint . | |
helm template . | |
- name: Lint omnibus chart | |
run: | | |
cd deploy/helm/mlflow-multitenant | |
helm dependency update | |
helm-hog test --no-apply --batch --auto-remove-success --parallel=0 | |
test: | |
# runs-on: ubuntu-latest | |
runs-on: self-hosted | |
permissions: | |
contents: read | |
steps: | |
# Checkout | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
# Install Deps | |
# Workaround: https://github.com/docker/build-push-action/issues/461 | |
- name: Setup Docker buildx | |
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf | |
- name: Install Helm | |
uses: azure/setup-helm@v1 | |
with: | |
version: '${{ env.HELM_VERSION }}' | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '^${{ env.GO_VERSION }}' | |
- name: Install Dependencies | |
run: | | |
make deps | |
# Tests | |
- name: Unit Tests | |
run: | | |
make test | |
- name: End-to-End Tests | |
run: | | |
make e2e |