Skip to content

Commit 6230ef1

Browse files
committed
Add capabilities to support multiple requirements files
1 parent 4faad3c commit 6230ef1

File tree

3 files changed

+4
-42
lines changed

3 files changed

+4
-42
lines changed

.github/workflows/cicd.yml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,6 @@ concurrency:
2222
permissions: read-all
2323

2424
jobs:
25-
get-python-versions:
26-
name: Get Python Versions (>= 3.9)
27-
runs-on: ubuntu-latest
28-
outputs:
29-
version-matrix: ${{ steps.get-language-versions.outputs.latest-versions }}
30-
31-
steps:
32-
- name: Get Required Versions
33-
uses: ActionsToolbox/get-language-versions-action@446919617fd774095b5dd3ed71c39dd3fd0d8f4f # v0.1.3
34-
id: get-language-versions
35-
with:
36-
language: "python"
37-
min-version: 3.9
38-
remove-patch-version: true
39-
4025
shellcheck:
4126
name: ShellCheck
4227
runs-on: ubuntu-latest
@@ -48,34 +33,11 @@ jobs:
4833
- name: Perform ShellCheck Analysis
4934
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/shellcheck/master/pipeline.sh)
5035

51-
pur:
52-
name: Pur
53-
needs: get-python-versions
54-
runs-on: ubuntu-latest
55-
56-
strategy:
57-
fail-fast: false
58-
matrix:
59-
python-versions: ${{ fromJson(needs.get-python-versions.outputs.version-matrix) }}
60-
61-
steps:
62-
- name: Checkout the Repository
63-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
64-
65-
- name: Setup Python ${{ matrix.python-versions }}
66-
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
67-
with:
68-
python-version: ${{ matrix.python-versions }}
69-
70-
- name: Perform Pur Analysis
71-
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/pur/master/pipeline.sh)
72-
7336
cicd-pipeline:
7437
if: always()
7538
name: CI/CD Pipeline
7639
needs:
7740
- shellcheck
78-
- pur
7941
runs-on: ubuntu-latest
8042

8143
steps:

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ message: If you use this software, please cite it using these metadata.
33
title: Pur
44
abstract: A tool to notify you of out of date requirements in requirements.txt.
55
type: software
6-
version: 0.1.0
7-
date-released: 2024-05-22
6+
version: 0.1.1
7+
date-released: 2024-06-24
88
repository-code: https://github.com/CICDToolbox/pur
99
keywords:
1010
- "Wolf Software"

pipeline.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ BANNER_NAME="${TEST_COMMAND[*]}"
4747
FILE_TYPE_SEARCH_PATTERN='No Magic String'
4848

4949
# File name to match [Regex based]
50-
FILE_NAME_SEARCH_PATTERN='\requirements.txt$'
50+
FILE_NAME_SEARCH_PATTERN='\requirements*.txt$'
5151

5252
# Set where to look for files.
5353
SCAN_ROOT='.'
@@ -270,7 +270,7 @@ function install_prerequisites()
270270
fail "${CMD[*]}" "${errors}" true
271271
exit "${EXIT_VALUE}"
272272
fi
273-
done < <(find . -name 'requirements.txt' -type f -not -path "./.git/*" | sed 's|^./||' | sort -Vf || true)
273+
done < <(find . -name 'requirements*.txt' -type f -not -path "./.git/*" | sed 's|^./||' | sort -Vf || true)
274274
fi
275275
}
276276

0 commit comments

Comments
 (0)