-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (41 loc) · 1.17 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: ci-test
on:
push:
branches:
- dev
#env: # = constants
# TEAMS : ""
# TEST_FILES : ""
jobs:
pre-job: # name of the job
runs-on: ubuntu-latest
outputs:
teams: ${{ steps.check.outputs.teams }}
steps:
- name: Say Hi
run: echo "Hi there !"
- name: Check teams that changed
id: check
run: |
for file in "narps_open/pipelines/team_2T6S.py" ".gitlab-ci.yml" "narps_open/pipelines/team_98BT.py" "narps_open/pipelines/team_1KB2_wip.py"
do
if [[ "$file" =~ .*"pipeline".* ]]; then
echo "Modified pipeline = $file"
tmp=${file#*"team_"} # remove prefix ending in "team_"
team_id=${tmp%".py"*} # remove suffix starting with ".py"
teams="$teams $team_id"
fi
done
echo $teams
echo "teams=$teams" >> $GITHUB_OUTPUT
display-job:
needs: pre-job
runs-on: ubuntu-latest
steps:
- name: Display team ids & associated test files
run: |
for team_id in ${{ needs.pre-job.outputs.teams }}
do
TEST_FILES="$TEST_FILES tests/pipelines/test_team_$team_id.py"
done
echo $TEST_FILES