Skip to content

build workflow passing #3

build workflow passing

build workflow passing #3

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@v2
# Step 2: Set up Python
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
# Step 3: Install Flit and Coverage
- name: Install Flit and Coverage
run: |
pip install flit
# Step 4: Install dependencies (including dev dependencies)
- name: Install dependencies
run: |
export FLIT_ROOT_INSTALL=1
flit install --deps=develop --extras=dev # Install dev dependencies
# Step 5: Run tests with coverage
- name: Run tests
run: |
coverage run --source=gds_fdtd -m pytest
coverage report
# Step 6: Upload coverage reports to Codecov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}