Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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