-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (33 loc) · 1.12 KB
/
Copy pathpython_tests.yaml
File metadata and controls
39 lines (33 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Python Unit Tests
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
build:
runs-on: ubuntu-latest # Or 'macos-latest', 'windows-latest' if your tests require a specific OS
steps:
- name: Checkout repository
# Checks out your repository under $GITHUB_WORKSPACE, so your workflow can access it.
uses: actions/checkout@v4
- name: Set up Python
# Sets up a Python environment. You can specify a version (e.g., '3.9', '3.10', '3.11').
uses: actions/setup-python@v5
with:
python-version: '3.11' # Ensure this matches your development environment or a compatible version
- name: Install dependencies
# Install project dependencies from requirements.txt
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Install tqdm explicitly if it's used but not in requirements.txt (as discussed)
pip install tqdm
- name: Run Unit Tests
# Discover and run all tests in the 'tests' directory.
run: |
python -m unittest discover tests