fixing non-integer acceleration bug #47
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
name: CI-CD | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.11, 3.12] # Specify the desired Python versions | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install .[test] | |
- name: Run tests | |
run: pytest --cov --cov-report=xml tests | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: INFN-MRI/pulserver | |
docs: | |
runs-on: ubuntu-20.04 | |
needs: [test] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
pip install .[doc] | |
python -m pip install -r docs/requirements.txt | |
- name: Build API documentation | |
run: | | |
python -m sphinx docs docs_build | |
- name: Display structure of docs | |
run: ls -R docs_build/ | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs_build | |
destination_dir: . # Ensure you deploy to the root of the gh-pages branch | |
publish_branch: gh-pages | |
keep_files: false |