Skip to content

Merge pull request #19 from daquintero/dario/fix_recursive_e_netlist #34

Merge pull request #19 from daquintero/dario/fix_recursive_e_netlist

Merge pull request #19 from daquintero/dario/fix_recursive_e_netlist #34

Workflow file for this run

name: Test code
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Test pre-commit hooks
run: |
python -m pip install --upgrade pip
pip install pre-commit
pre-commit run -a
test_code:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 12
matrix:
python-version: ["3.11"]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
key: ${{ hashFiles('pyproject.toml') }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
make install
make test-data
- name: Test with pytest
run: |
pip install pytest
pytest
test_code_coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
make install test-data
- name: Test with pytest
run: |
pytest --cov=gdsfactory
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false