GitHub workflow #5
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: clang_tidy_format | |
on: | |
pull_request: # This triggers the workflow for pull requests | |
branches: | |
- main # Run tests for pull requests targeting the "main" branch | |
paths: | |
- 'src/**' | |
- 'testing/**' | |
- 'vmsdk/src/**' | |
- 'vmsdk/testing/**' | |
push: | |
branches: | |
- main # Optional: Run tests for direct pushes to "main" | |
paths: | |
- 'src/**' | |
- 'testing/**' | |
- 'vmsdk/src/**' | |
- 'vmsdk/testing/**' | |
workflow_dispatch: # allow manual triggering | |
concurrency: | |
group: codeql-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
bazel-tests: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the code from the repository | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
# Set up Docker to build and run the container | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v2 | |
# Build the Docker image from the Dockerfile in your repo | |
- name: Build Docker Image | |
run: docker build -t clang-tidy-format-image -f .devcontainer/Dockerfile . | |
- name: Run clang-tidy/format | |
run: | | |
git fetch origin main | |
docker run --rm -v "$(pwd):/workspace" --user "$(id -u):$(id -g)" clang-tidy-format-image bash -c "bazel build //... && ci/check_changes.sh origin/main...HEAD" |