-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
14 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 |
This file contains 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