Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
Create workflow file for GitHub actions to gain automated tests
  • Loading branch information
Endogen authored Jan 22, 2025
1 parent 38745aa commit 6e12fe4
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/main.yml
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

0 comments on commit 6e12fe4

Please sign in to comment.