Skip to content

Consolidate git actions into commit-check script #1

Consolidate git actions into commit-check script

Consolidate git actions into commit-check script #1

Workflow file for this run

name: commit-checks
on:
pull_request:
branches:
- 'main'
- 'preview-[0-9]+\.[0-9]+\.[0-9]+'
paths-ignore:
- '.gitignore'
- '*.md'
push:
branches:
- 'main'
- 'gh-actions*'
jobs:
all_tests:
runs-on: ubuntu-latest
name: 'commit-checks'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- uses: azure/setup-helm@v3
with:
version: '3.10.0'
- uses: helm/[email protected]
- name: Run chart-testing (list-changed)
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --config .github/config/ct.yml --target-branch ${{ github.event.repository.default_branch }}
- name: Run chart-testing (check-version-increment)
run: ct lint --config .github/config/ct-version-increment.yml --target-branch ${{ github.event.repository.default_branch }}
- name: Run check-dependency-version-increment
run: |
python3 -m pip install --upgrade pip
python3 -m pip install PyYAML
scripts/check-dependency-version-increment
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ludeeus/[email protected]
with:
scandir: 'scripts/'
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v5
with:
context: "tests"
load: true
tags: tests:latest
- name: "Build container"
run: |
docker build tests/ -t helm-tests
- name: "Run Control Plane unit tests"
run: |
docker run -v "$PWD/:/charts" helm-tests bats tests/ut/xrd-control-plane
- name: "Run vRouter unit tests"
run: |
docker run -v "$PWD/:/charts" helm-tests bats tests/ut/xrd-vrouter