From 8c67fcedfe2b65e13c0e9227a75dba0d8ecb831d Mon Sep 17 00:00:00 2001 From: Thomas Schmelzer Date: Mon, 19 Feb 2024 12:33:54 +0400 Subject: [PATCH 1/6] Create action.yml --- actions/deptry/action.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 actions/deptry/action.yml diff --git a/actions/deptry/action.yml b/actions/deptry/action.yml new file mode 100644 index 0000000..88f2760 --- /dev/null +++ b/actions/deptry/action.yml @@ -0,0 +1,5 @@ + before_script: + - poetry run pip install deptry + + script: + - poetry run deptry $SOURCE_DIRS From 8606e243b88b09bc81d138009b8478610fa89c97 Mon Sep 17 00:00:00 2001 From: Thomas Schmelzer Date: Mon, 19 Feb 2024 12:36:38 +0400 Subject: [PATCH 2/6] Update action.yml --- actions/deptry/action.yml | 43 +++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/actions/deptry/action.yml b/actions/deptry/action.yml index 88f2760..61e38f8 100644 --- a/actions/deptry/action.yml +++ b/actions/deptry/action.yml @@ -1,5 +1,40 @@ - before_script: - - poetry run pip install deptry +# Copyright 2023 Stanford University Convex Optimization Group +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +name: Run Deptry analysis - script: - - poetry run deptry $SOURCE_DIRS +description: "Perform Deptry" + +on: + workflow_call: + inputs: + python-version: + description: 'Python version' + type: string + required: false + default: '3.10' + source-folder: + description: 'Source folder' + type: string + required: false + default: 'cvx' + +runs: + using: "composite" + steps: + - uses: cvxgrp/.github/actions/setup-environment@main + with: + python-version: ${{ inputs.python-version || '3.10' }} + + - name: Install deptry + From 6180684c2e428b5b8bfa04ea65ff5f3d83a145d3 Mon Sep 17 00:00:00 2001 From: Thomas Schmelzer Date: Mon, 19 Feb 2024 12:38:23 +0400 Subject: [PATCH 3/6] Update action.yml --- actions/deptry/action.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/actions/deptry/action.yml b/actions/deptry/action.yml index 61e38f8..c99c82a 100644 --- a/actions/deptry/action.yml +++ b/actions/deptry/action.yml @@ -36,5 +36,13 @@ runs: with: python-version: ${{ inputs.python-version || '3.10' }} - - name: Install deptry - + - name: Install pytest + shell: bash + run: | + poetry run pip install --no-cache-dir \ + deptry + + - name: Run tests + shell: bash + run : | + poetry run deptry ${{ inputs.source-folder || 'cvx' }} From 7a39d1aceb2f53d06d385177fa45688bf709360c Mon Sep 17 00:00:00 2001 From: Thomas Schmelzer Date: Mon, 19 Feb 2024 12:39:35 +0400 Subject: [PATCH 4/6] Create deptry.yml --- .github/workflows/deptry.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/deptry.yml diff --git a/.github/workflows/deptry.yml b/.github/workflows/deptry.yml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/workflows/deptry.yml @@ -0,0 +1 @@ + From e97931370108528eff84aabcb2983757bf317687 Mon Sep 17 00:00:00 2001 From: Thomas Schmelzer Date: Mon, 19 Feb 2024 12:40:24 +0400 Subject: [PATCH 5/6] Update deptry.yml --- .github/workflows/deptry.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/deptry.yml b/.github/workflows/deptry.yml index 8b13789..e0efab3 100644 --- a/.github/workflows/deptry.yml +++ b/.github/workflows/deptry.yml @@ -1 +1,16 @@ +name: Analyse with deptry +on: + [push] + +jobs: + build_paper: + runs-on: ubuntu-latest + + steps: + - name: Set up Git repository + uses: actions/checkout@v4 + + - uses: ./actions/deptry + with: + source-folder: "cvx" From 3608219509d337eea1bb914ad42949ff621d7d0d Mon Sep 17 00:00:00 2001 From: Thomas Schmelzer Date: Mon, 19 Feb 2024 12:41:34 +0400 Subject: [PATCH 6/6] Update deptry.yml --- .github/workflows/deptry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deptry.yml b/.github/workflows/deptry.yml index e0efab3..cfa00c6 100644 --- a/.github/workflows/deptry.yml +++ b/.github/workflows/deptry.yml @@ -4,7 +4,7 @@ on: [push] jobs: - build_paper: + run-deptry: runs-on: ubuntu-latest steps: