-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (47 loc) · 1.85 KB
/
Copy pathpython-app.yml
File metadata and controls
59 lines (47 loc) · 1.85 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# .github/workflows/python-app.yml
name: Build and Test pytorf # Renamed for clarity
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
# Optional: Install system dependencies if needed for C++ compilation
# Often needed for packages like datatable if wheels aren't available
# ubuntu-latest runners usually have common build tools
- name: Install system build dependencies (if needed)
run: |
sudo apt-get update -y
sudo apt-get install -y build-essential cmake libomp5 # Example deps for datatable build
- name: Install Python dependencies (pip, setuptools, wheel)
run: |
python -m pip install --upgrade pip setuptools wheel
# Install the package itself along with its dependencies from pyproject.toml
# This command runs from the root of the checked-out repository
- name: Install pytorf package and dependencies
run: pip install .
# --- Add subsequent steps below ---
# Example: Linting
# - name: Lint with flake8
# run: |
# pip install flake8
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# Example: Testing (if you have tests, e.g., using pytest)
# - name: Test with pytest
# run: |
# pip install pytest
# pytest tests/ # Assuming tests are in a 'tests' directory