Skip to content

[pre-commit.ci] pre-commit autoupdate #314

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #314

Workflow file for this run

# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
#
name: Test
on:
pull_request:
paths-ignore:
- "**.md"
- ".github/workflows/*"
- "!.github/workflows/test.yaml"
push:
paths-ignore:
- "**.md"
- ".github/workflows/*"
- "!.github/workflows/test.yaml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
workflow_dispatch:
jobs:
chart-tests:
runs-on: ubuntu-22.04
strategy:
# Keep running even if one variation of the job fail
fail-fast: false
matrix:
# We run this job multiple times with different parameterization
# specified below, these parameters have no meaning on their own and
# gain meaning on how job steps use them.
include:
- python: "3.7"
helm2: helm2
- python: "3.8"
- python: "3.9"
- python: "3.10"
- python: "3.11"
services:
local-registry:
image: registry:2
ports:
- 5000:5000
steps:
- uses: actions/checkout@v4
with:
# chartpress requires the full history
fetch-depth: 0
# NOTE: actions/setup-python@v5 make use of a cache within the GitHub base
# environment and setup in a fraction of a second.
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python }}"
- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install .
pip install -r dev-requirements.txt
pip freeze
- name: Install helm
run: |
if [[ "$HELM2" == "helm2" ]]; then
curl -L https://git.io/get_helm.sh | bash
helm init --client-only
else
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
fi
env:
HELM2: ${{ matrix.helm2 }}
# https://github.com/docker/setup-buildx-action
- name: Setup docker buildx
uses: docker/setup-buildx-action@v3
with:
# Allows pushing to registry on localhost:5000
driver-opts: network=host
- name: Log environment information
run: |
docker version
docker buildx ls
helm version --client
chartpress --version
chartpress --help
- name: Configure a git user
# Having a user.email and user.name configured with git is required to
# make commits, which is something chartpress does when publishing.
# While Travis CI had a dummy user by default, GitHub Actions doesn't
# and require this explicitly setup.
run: |
git config --global user.email "github-actions@example.local"
git config --global user.name "GitHub Actions user"
- name: Run tests
run: |
pytest --verbose --color=yes --cov chartpress
env:
HELM2: ${{ matrix.helm2 }}
# GitHub action reference: https://github.com/codecov/codecov-action
- uses: codecov/codecov-action@v4