Add any branch to trigger action #4
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: Python Unittest on Pull Request | |
on: | |
push: | |
branches: | |
- '**' # Trigger on any branch push | |
pull_request: | |
branches: | |
- '**' # Trigger on any pull request | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Set up Python environment | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
# Install dependencies using pyproject.toml | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
# Run unittests | |
- name: Run unittests | |
run: | | |
python -W ignore -m unittest discover |