Skip to content
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.

ci: fix scheduled tests #635

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ on:
- cron: '0 1 * * *'

pull_request:

push:
branches:
- main

jobs:

find-features:
Expand All @@ -44,10 +44,10 @@ jobs:
all-features: ${{ steps.list-features.outputs.all_features }}
changed-features: ${{ steps.list-features.outputs.changed_features }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- run: |
echo ${{ inputs.enabled }}
echo ${{ github.event_name }}
echo ${{ github.event_name }}

- id: list-features
uses: ./.github/actions/list-changed-features-action
Expand All @@ -68,21 +68,25 @@ jobs:

elif [ ${{ github.event_name }} == 'push' ]; then
echo 'features_to_test=${{ needs.find-features.outputs.changed-features }}' >> $GITHUB_OUTPUT

elif [ ${{ github.event_name }} == 'workflow_dispatch' ]; then

if [ ${{ inputs.on_changes_only }} == 'true' ]; then
echo 'features_to_test=${{ needs.find-features.outputs.changed-features }}' >> $GITHUB_OUTPUT
else
echo 'features_to_test=${{ needs.find-features.outputs.all-features }}' >> $GITHUB_OUTPUT
fi

elif [ ${{ github.event_name }} == 'workflow_call' ]; then
if [ ${{ inputs.on_changes_only }} == 'true' ]; then
echo 'features_to_test=${{ needs.find-features.outputs.changed-features }}' >> $GITHUB_OUTPUT
else
echo 'features_to_test=${{ needs.find-features.outputs.all-features }}' >> $GITHUB_OUTPUT
fi
fi

else # event_name == 'schedule'
echo 'features_to_test=${{ needs.find-features.outputs.all-features }}' >> $GITHUB_OUTPUT

fi

- name: binning
Expand Down Expand Up @@ -140,12 +144,12 @@ jobs:

# install shellcheck
comma_separated_features=${{ matrix.features }}
for i in ${comma_separated_features//,/ }

for i in ${comma_separated_features//,/ }
do
shellcheck --severity=error -e SC2148 src/"$i"/*.sh
shellcheck --severity=error -e SC2148 src/"$i"/*.sh
done

test-global:
runs-on: ubuntu-latest
continue-on-error: true
Expand Down