Skip to content

Commit

Permalink
Merge pull request #11 from 7rikazhexde/dev24-10-4
Browse files Browse the repository at this point in the history
✅Add bash for loop sample
  • Loading branch information
7rikazhexde authored Oct 27, 2024
2 parents 582fb61 + 7c5f3cc commit 032444e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/prch_test_matrix_json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@ jobs:
echo "versions_python: $versions_python"
echo "ghpages_branch: $ghpages_branch"
# For loop
os_list=$(echo "$os" | jq -r '.[]' | tr '\n' ' ' | sed 's/ $//')
python_versions_list=$(echo "$versions_python" | jq -r '.[]' | tr '\n' ' ' | sed 's/ $//')
for os in $os_list; do
for version in $python_versions_list; do
echo "Current OS: $os, Current Python Version: $version"
done
done
- name: Run pytest
id: pytest
shell: bash
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,16 @@ jobs:
echo "versions_python: $versions_python"
echo "ghpages_branch: $ghpages_branch"
# For loop
os_list=$(echo "$os" | jq -r '.[]' | tr '\n' ' ' | sed 's/ $//')
python_versions_list=$(echo "$versions_python" | jq -r '.[]' | tr '\n' ' ' | sed 's/ $//')
for os in $os_list; do
for version in $python_versions_list; do
echo "Current OS: $os, Current Python Version: $version"
done
done
- name: Run pytest
id: pytest
shell: bash
Expand Down

0 comments on commit 032444e

Please sign in to comment.