Skip to content

Commit

Permalink
fix cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
joamatab committed Aug 7, 2023
1 parent 09e8ce4 commit bc1cd6f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 50 deletions.
63 changes: 14 additions & 49 deletions .github/workflows/test_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ jobs:
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
test_code:
needs: [pre-commit]
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 12
matrix:
python-version: ["3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.11"]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
Expand All @@ -32,64 +31,29 @@ jobs:
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
pip install .
pip install flake8 pytest pytest_regressions
- name: Lint with flake8
run: |
flake8 .
make dev
- name: Test with pytest
run: pytest
test_code_coverage_python37:
runs-on: ubuntu-latest
needs: [pre-commit]

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
pip install -e .
- name: Test with pytest
run: |
python -m pip install --upgrade pip
pip install pytest klayout lytest scikit-image pytest-cov pytest_regressions
pytest --cov=sky130 tests/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
run: pytest tests/
test_docs:
needs: [pre-commit]
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 12
matrix:
python-version: [3.9]
python-version: [3.11]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
channels: conda-forge,defaults
channel-priority: true
activate-environment: anaconda-client-env
- name: Add conda to system path
run: |
echo $CONDA/bin >> $GITHUB_PATH
python-version: "3.11"
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
sudo apt install pandoc
pip install -e .[docs,dev]
conda list > requirements.txt
make dev
pip freeze > requirements.txt
- uses: actions/upload-artifact@v3
with:
name: requirements
Expand All @@ -99,7 +63,8 @@ jobs:
TIDY3D_USER: ${{ secrets.TIDY3D_EMAIL }}
TIDY3D_PASS: ${{ secrets.TIDY3D_PASSWORD }}
DISPLAY: 1.0
DOCS: True
GDSFACTORY_DISPLAY_TYPE: klayout
run: |
mkdir -p $HOME/.tidy3d
echo ${{ secrets.TIDY3D_AUTH }} > $HOME/.tidy3d/auth.json
make docs
1 change: 0 additions & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ sphinx:
- "sphinx.ext.napoleon"
- "sphinx.ext.viewcode"
- "matplotlib.sphinxext.plot_directive"
- "sphinx_click"
- "sphinxcontrib.autodoc_pydantic"
config:
#autodoc_typehints: description
Expand Down

0 comments on commit bc1cd6f

Please sign in to comment.