-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 935 Bytes
/
run-tests.yml
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
name: CI - Run Tests
on:
push:
branches:
- main # Run this workflow when you push to the main branch
pull_request:
branches:
- main # Also run on pull requests to the main branch
jobs:
test:
runs-on: ubuntu-latest
steps:
# Checkout the repository code
- name: Checkout code
uses: actions/checkout@v3
# Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11.9" # You can adjust this version as needed
# Upgrade pip to the latest version
- name: Upgrade pip
run: python -m pip install --upgrade pip
# Install dependencies
- name: Install dependencies
run: |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# Run your tests (assuming you're using pytest)
- name: Run tests
run: |
pytest