Skip to content

Commit

Permalink
improve cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
joamatab committed Aug 7, 2023
1 parent cc17df1 commit 07243ad
Showing 1 changed file with 20 additions and 35 deletions.
55 changes: 20 additions & 35 deletions .github/workflows/test_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Test pre-commit hooks
run: |
python -m pip install --upgrade pip
pip install pre-commit
pre-commit run -a
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
test_code:
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
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -41,45 +33,38 @@ jobs:
run: |
make dev
- name: Test with pytest
run: pytest
test_code_coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
make dev
- name: Test with pytest
run: |
pytest --cov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
run: pytest tests/
test_docs:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 12
matrix:
python-version: ['3.10']
python-version: [3.11]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: "3.11"
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
make dev
pip freeze > requirements.txt
- uses: actions/upload-artifact@v3
with:
name: requirements
path: requirements.txt
- name: Test documentation
env:
TIDY3D_USER: ${{ secrets.TIDY3D_EMAIL }}
TIDY3D_PASS: ${{ secrets.TIDY3D_PASSWORD }}
DISPLAY: 1.0
DOCS: True
GDSFACTORY_DISPLAY_TYPE: klayout
run: |
mkdir -p $HOME/.tidy3d
make docs

0 comments on commit 07243ad

Please sign in to comment.