From 07243ad1a2ce7ec391c5bdb8bf31350122cd4372 Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Sun, 6 Aug 2023 22:09:01 -0700 Subject: [PATCH] improve cicd --- .github/workflows/test_code.yml | 55 ++++++++++++--------------------- 1 file changed, 20 insertions(+), 35 deletions(-) diff --git a/.github/workflows/test_code.yml b/.github/workflows/test_code.yml index 81c887e..f0db00d 100644 --- a/.github/workflows/test_code.yml +++ b/.github/workflows/test_code.yml @@ -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/action@v3.0.0 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 }} @@ -41,32 +33,13 @@ 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: @@ -74,12 +47,24 @@ jobs: - 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