Skip to content

Commit

Permalink
chore(build): add helm lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianBezold committed May 9, 2023
1 parent d996794 commit 2288815
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .act/pr_event.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"repository": {
"default_branch": "main"
}
}
56 changes: 56 additions & 0 deletions .github/workflows/helm-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# #############################################################################
# Copyright (c) 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
# #############################################################################
---
name: Lint Helm Charts (PR + dispatch)

on:
pull_request:
branches: main
paths:
- 'charts/**'
workflow_dispatch:

jobs:
lint-charts:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.11.2

- uses: actions/setup-python@v4
with:
python-version: '3.9'
check-latest: true

- name: Set up chart-testing
uses: helm/[email protected]

- name: Run chart-testing (lint)
run: |
ct lint \
--validate-maintainers=false \
--check-version-increment=false \
--target-branch ${{ github.event.repository.default_branch }}
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
# e2e-testing
# Eclipse Tractus-X e2e-testing

The repository is the homebase for all e2e test automation efforts at Eclipse Tractus-X.
It contains umbrella Helm Chart to deploy a sandbox Catena-X dataspace based on the Tractus-X OSS components, as well as
automated tests and workflows to verify the end-to-end use cases and the compatibility of the OSS components and versions.

## Testing GitHub workflows locally

If you want to try out your new or improved GitHub workflow locally, before pushing, you can try to use
[act](https://github.com/nektos/act). Follow the official [installation instructions](https://github.com/nektos/act#installation)
for your OS/package manager to set it up on your machine.

There is also plenty of documentation on how to use act and simulate events, that would trigger workflow runs on GitHub.
Some workflows might run into issues, when running them locally. This might be caused by missing values for
`${{ github.event }}` references. To fix this, you can provide your own [event](https://github.com/nektos/act#installation)
as `.json` file. There are already examples present in the [/.act](.act) directory.

An local example run via `act` could look like the following: `act -e .act/pr_event.json pull_request`

0 comments on commit 2288815

Please sign in to comment.