Update tests workflow. #11
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: LegaBot Tests | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
# ------------------------------------------------------------------------------------------------------------------------------------------------ | |
# Event `pull_request`: Compare the last commit of the main branch or last remote commit of the PR branch -> to the current commit of a PR branch. | |
# ------------------------------------------------------------------------------------------------------------------------------------------------ | |
changed_files: | |
runs-on: ubuntu-latest # windows-latest || macos-latest | |
name: Test changed-files | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get changed files in the docs folder | |
id: changed-files-specific | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: router/** # *.{js,html} # Alternatively using: `docs/**` | |
# files_ignore: docs/static.js | |
- name: Run step if any file(s) in the router folder change | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
env: | |
ALL_CHANGED_FILES: ${{ steps.changed-files-specific.outputs.all_changed_files }} | |
run: python -m unittest tests/test_router.py |