Skip to content

Implement vector potential calcs #7

Implement vector potential calcs

Implement vector potential calcs #7

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: build_and_test
on:
# push: [] # Save time on actions
pull_request: []
workflow_dispatch:
tag: "Manual Run"
jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Setup
run: |
# Base setup
sudo apt update
sudo apt install build-essential
# Install Rust & Cargo
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
rustup component add clippy
# Set up pip and a virtualenv (s.t. maturin can run)
python -m pip install --upgrade pip
python -m venv ./env
source ./env/bin/activate
# Install with dev deps
pip install maturin
maturin develop
pip install .[dev]
- name: Test
run: |
source ./env/bin/activate
# Python lint, test, and coverage
ruff check ./cfsem
pyright ./cfsem --pythonversion 3.11
coverage run --source=./cfsem -m pytest ./test/
coverage report
# Rust format and lint
cargo fmt --check
cargo clippy
# Build docs
sh build_docs.sh