Add placeholder to test only modified files #17
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main' }} | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Run tests | |
run: | | |
#!/usr/bin/env bash | |
set -euo pipefail | |
modified_files=$(git diff --diff-filter=d --name-only HEAD^ HEAD) | |
echo "$(echo $modified_files | wc -l | xargs) modified files (showing at most 20):" | |
echo "$modified_files" | head -n 20 | |
echo "--------------------------------------------------------------------------------" | |
# TODO: Run tests only for modified files | |
./scripts/tests/run_tests.sh |