Add unit tests for test helpers and apply some fixes to the functions #27
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 | awk '{print $1}') modified file(s) (excluding deleted files; showing at most 20):" | |
echo "$modified_files" | sort | head -n 20 | |
echo "--------------------------------------------------------------------------------" | |
# TODO: Run tests only for modified files | |
./scripts/tests/run_all_tests.sh |