-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create workflow file for GitHub actions to gain automated tests
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.11.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11.8' | ||
|
||
- name: Install system dependencies | ||
run: sudo apt-get update && sudo apt-get install -y pkg-config libhdf5-dev build-essential | ||
|
||
- name: Set up Python environment | ||
run: python3.11 -m venv xian_venv | ||
|
||
- name: Activate virtual environment and install dependencies | ||
run: | | ||
source xian_venv/bin/activate | ||
pip install -e . | ||
pip install pytest # Install pytest explicitly | ||
- name: Run tests | ||
run: | | ||
source xian_venv/bin/activate | ||
pytest tests |