Add functionality to run Python scripts (#21) #53
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) | |
number_modified_files=$(echo "$modified_files" | wc -l | awk '{print $1}') | |
echo "$number_modified_files modified file(s) (excluding deleted files)" | |
echo "--------------------- Modified files (showing at most 20) ----------------------" | |
echo "$modified_files" | sort | head -n 20 | |
echo "--------------------------------------------------------------------------------" | |
echo | |
echo "---------------------------------- Install uv ----------------------------------" | |
curl -LsSf https://astral.sh/uv/install.sh | sh | |
echo "--------------------------------------------------------------------------------" | |
echo | |
# TODO: Run tests only for modified files | |
./scripts/tests/run_all_tests.sh |