-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add pipeline for lint and unit tests
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
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,28 @@ | ||
name: Setup Helm | ||
|
||
inputs: | ||
helm-version: | ||
description: The version of Helm to setup | ||
default: v3.12.0 | ||
required: false | ||
type: string | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
id: install-helm | ||
with: | ||
version: ${{ inputs.helm-version }} | ||
|
||
- name: Add and update repos | ||
run: | | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm repo add passbolt-library https://download.passbolt.com/charts/passbolt-library | ||
helm repo update | ||
shell: bash | ||
|
||
- name: Build chart dependencies | ||
run: helm dependency build | ||
shell: bash |
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,40 @@ | ||
name: Push & PR to the main branch | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Helm | ||
uses: ./.github/actions/setup_helm | ||
|
||
- name: Run linter | ||
run: helm lint | ||
|
||
unit-test: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Helm | ||
uses: ./.github/actions/setup_helm | ||
|
||
- name: Install Helm unit test plugin | ||
run: helm plugin install https://github.com/helm-unittest/helm-unittest.git | ||
|
||
- name: Run unit tests | ||
run: helm unittest . |