Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
Signed-off-by: jamshale <[email protected]>
  • Loading branch information
jamshale committed Nov 10, 2023
1 parent 32dfa82 commit fdb2da3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 20 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/pr-integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,25 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3
#----------------------------------------------
# Get docker compose
#----------------------------------------------
- name: Initialize Docker Compose
uses: isbang/[email protected]
#----------------------------------------------
# Get changed files
#----------------------------------------------
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
- name: Initialize Docker Compose
uses: isbang/[email protected]
#----------------------------------------------
# Run integration tests for changed plugins
# Get changed plugins
#----------------------------------------------
- name: Run integration tests
id: integration-tests
- name: Get changed plugins
id: changed-plugins
run: |
# This will navigate to each subdirectory and perform integration tests
# If we have a directory that isn't a plugin then it will need to skip it. Currently there is none.
# Collects all the plugin names that have changes.
# If there is directory that isn't a plugin then it will need to skip it. Currently there is none.
declare -a changed_dirs=()
for dir in ./*/; do
current_folder=$(basename "$dir")
Expand All @@ -44,8 +47,15 @@ jobs:
done
done
echo "changed-plugins=${changed_dirs[*]}" >> $GITHUB_OUTPUT
for dir in ${changed_dirs[*]}; do
#----------------------------------------------
# Get changed plugins
#----------------------------------------------
- name: Run Integration Tests
id: integration-tests
run: |
for dir in ${{ steps.changed-plugins.outputs.changed-plugins }}; do
echo "Running integration tests for $dir"
cd $dir/integration
docker compose build
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/pr-linting-and-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,30 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3
#----------------------------------------------
# Install python and poetry with cache
#----------------------------------------------
- name: Install poetry
run: pipx install poetry
id: setup-poetry
- uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "poetry"
#----------------------------------------------
# Get changed files
#----------------------------------------------
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
#----------------------------------------------
# Get changed plugins
#----------------------------------------------
- name: Get changed plugins
id: changed-plugins
run: |
# This will navigate to each subdirectory and perform integration tests
# If we have a directory that isn't a plugin then it will need to skip it. Currently there is none.
# Collects all the plugin names that have changes.
# If there is directory that isn't a plugin then it will need to skip it. Currently there is none.
declare -a changed_dirs=()
for dir in ./*/; do
current_folder=$(basename "$dir")
Expand All @@ -43,16 +56,6 @@ jobs:
echo "changed-plugins=${changed_dirs[*]}" >> $GITHUB_OUTPUT
#----------------------------------------------
# Install python and poetry with cache
#----------------------------------------------
- name: Install poetry
run: pipx install poetry
id: setup-poetry
- uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "poetry"
#----------------------------------------------
# Install dependencies
#----------------------------------------------
- name: Install dependencies
Expand Down

0 comments on commit fdb2da3

Please sign in to comment.