python requirement 3.10 instead of 3.11 #48
This file contains hidden or 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: Build and Test (Flit) | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build-and-test-flit: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Check out the repository | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
# Step 2: Set up Python | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
# Step 3: Install Flit, pytest, pytest-cov, and Coverage | |
- name: Install Flit, pytest, pytest-cov, and Coverage | |
run: | | |
pip install flit pytest pytest-cov coverage[toml] | |
# Step 4: Install dependencies (including dev dependencies) | |
- name: Install package (dev extras) | |
env: | |
FLIT_ROOT_INSTALL: "1" | |
run: | | |
flit install --deps develop --extras dev | |
# Step 5: Run tests with coverage | |
- name: Run tests with coverage | |
run: | | |
pytest --cov=gds_fdtd --cov-branch --cov-report=xml | |
# Step 6: Upload coverage reports to Codecov | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage.xml | |
flags: unittests | |
slug: SiEPIC/gds_fdtd |