Add CI workflow #6
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 CI | |
on: | |
push: | |
branches: [ "main" ] # Run on push to the main branch. Change this if you are using a different branch. | |
jobs: | |
test: | |
runs-on: ubuntu-latest # Use the latest Ubuntu environment. You are welcome to change this. | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 # Check out the code from the repository | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' # Specify the Python version you want to use | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Run tests | |
run: | | |
pytest |