Consolidate git actions into commit-check script #7
Workflow file for this run
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: 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 all tests | |
run: scripts/commit-check-new | |
- 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 | |