Skip to content

Commit 47041b1

Browse files
committed
🔀 Merge branch 'develop' into 'security/code-scanning-alerts'
2 parents b8cd11c + cf01702 commit 47041b1

File tree

17 files changed

+310
-235
lines changed

17 files changed

+310
-235
lines changed

.circleci/main.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
version: 2.1
33
# Singularity started failing to set up on Circle circa May 2023, so those tests are currently disabled
44

5+
orbs:
6+
codecov: codecov/codecov@5
7+
58
parameters:
69
branch:
710
type: string
@@ -36,7 +39,8 @@ commands:
3639
name: "Combining and reporting coverage"
3740
command: |
3841
coverage combine
39-
coverage html --ignore-errors
42+
coverage xml -o coverage.xml # Generate XML report
43+
- codecov/upload
4044
configure-git-user:
4145
steps:
4246
- add_ssh_keys:
@@ -185,8 +189,6 @@ jobs:
185189
# key: coverage-singularity-lite-{{ .Revision }}
186190
- set-python-version
187191
- combine-coverage
188-
- store_artifacts:
189-
path: htmlcov
190192
push-branch-to-docker-hub:
191193
parameters:
192194
variant:

.codecov.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
codecov:
2+
branch: main
3+
4+
comment:
5+
layout: "diff, files"
6+
behavior: default
7+
require_changes: false
8+
require_base: false
9+
require_head: true
10+
hide_project_coverage: false
11+
12+
coverage:
13+
precision: 1
14+
range: "50..90"
15+
round: nearest
16+
status:
17+
project:
18+
default: # default is the status check's name, not default settings
19+
only_pulls: false
20+
target: auto
21+
threshold: "5"

.github/README/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ flowchart LR
4646
subgraph build_C-PAC.yml
4747
bCPAC[[C-PAC]]
4848
end
49-
subgraph build_and_test.yml
49+
subgraph build_and_test.yaml
5050
ubuntu[[Ubnutu]]-->stages[[stages]]-->build-base[[build-base]]-->build-base-standard[[build-base-standard]]
5151
5252
Circle_tests[[Circle_tests]]
@@ -65,7 +65,7 @@ flowchart LR
6565
smoke-tests-participant[[smoke-tests-participant]]
6666
end
6767
68-
on_push.yml-->build_and_test.yml
68+
on_push.yaml-->build_and_test.yaml
6969
7070
delete_images.yml
7171
end
@@ -79,8 +79,8 @@ flowchart LR
7979
8080
Circle_tests-->CircleCI((Run tests on Circle CI))
8181
82-
on_push.yml<-->get_pr_base_shas
83-
on_push.yml-->update_all_preconfigs
82+
on_push.yaml<-->get_pr_base_shas
83+
on_push.yaml-->update_all_preconfigs
8484
8585
cpacdockerfiles<-->C-PAC
8686
@@ -94,7 +94,7 @@ flowchart LR
9494
bCPAC<-->local_ghcr
9595
stages<-->local_ghcr
9696
97-
push>git push]-->on_push.yml
97+
push>git push]-->on_push.yaml
9898
9999
smoke-tests-participant-->smoke_test_human
100100
smoke-tests-participant-->smoke_test_nhp

.github/workflows/build_and_test.yml renamed to .github/workflows/build_and_test.yaml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ on:
5252
description: 'third phase of staging images to rebuild (base images)'
5353
type: string
5454
required: true
55+
test_mode:
56+
description: 'lite or full?'
57+
type: string
58+
default: None
5559

5660
jobs:
5761
Ubuntu:
@@ -192,7 +196,7 @@ jobs:
192196
run: |
193197
sed -i -e 's/^/\.github\/Dockerfiles\//' .github/stage_requirements/${{ matrix.variant }}.txt
194198
echo 'dev/docker_data/required_afni_pkgs.txt' >> .github/stage_requirements/${{ matrix.variant }}.txt
195-
echo '.github/workflows/build_and_test.yml' >> .github/stage_requirements/${{ matrix.variant }}.txt
199+
echo '.github/workflows/build_and_test.yaml' >> .github/stage_requirements/${{ matrix.variant }}.txt
196200
echo '.github/stage_requirements/${{ matrix.variant }}.txt' >> .github/stage_requirements/${{ matrix.variant }}.txt
197201
- name: Set tag & see if it exists
198202
continue-on-error: true
@@ -264,7 +268,7 @@ jobs:
264268
run: |
265269
sed -i -e 's/^/\.github\/Dockerfiles\//' .github/stage_requirements/standard.txt
266270
echo 'dev/docker_data/required_afni_pkgs.txt' >> .github/stage_requirements/standard.txt
267-
echo '.github/workflows/build_and_test.yml' >> .github/stage_requirements/standard.txt
271+
echo '.github/workflows/build_and_test.yaml' >> .github/stage_requirements/standard.txt
268272
echo '.github/stage_requirements/standard.txt' >> .github/stage_requirements/standard.txt
269273
- name: Set tag & see if it exists
270274
continue-on-error: true
@@ -333,19 +337,21 @@ jobs:
333337
if: github.ref_name == 'develop' || github.ref_name == 'main'
334338
uses: ./.github/workflows/smoke_test_participant.yml
335339

336-
regtest-lite:
337-
name: Run lite regression test
340+
check_test_mode:
341+
name: check_test_mode
342+
runs-on: ubuntu-latest
343+
steps:
344+
- run: echo ${{ inputs.test_mode }}
345+
346+
regtest:
347+
name: Run regression and integration test
338348
needs:
339349
- C-PAC
340350
secrets: inherit
341-
if: contains(github.event.head_commit.message, '[run reg-suite]')
342-
uses: ./.github/workflows/regression_test_lite.yml
343-
344-
regtest-full:
345-
name: Run full regression test
346-
needs:
347-
- smoke-tests-participant
348-
uses: ./.github/workflows/regression_test_full.yml
351+
if: inputs.test_mode == 'lite'
352+
uses: ./.github/workflows/regtest.yaml
353+
with:
354+
test_mode: ${{ inputs.test_mode }}
349355

350356
Circle_tests:
351357
name: Run tests on CircleCI

.github/workflows/on_push.yml renamed to .github/workflows/on_push.yaml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,36 @@ jobs:
107107
echo "phase_three=${phase_three}" >> $GITHUB_OUTPUT
108108
echo "rebuild_phase_three=${rebuild_phase_three}" >> $GITHUB_OUTPUT
109109
110+
check_pr:
111+
runs-on: ubuntu-latest
112+
outputs:
113+
test_mode: ${{ steps.check_pr.outputs.test_mode }}
114+
steps:
115+
- name: Check out C-PAC
116+
uses: actions/checkout@v3
117+
with:
118+
fetch-depth: 2
119+
- name: Check if commit is in a PR to develop
120+
id: check_pr
121+
run: |
122+
TEST_MODE=none
123+
if echo "${{ github.event.head_commit.message }}" | grep -q '\[run reg-suite lite\]'
124+
then
125+
TEST_MODE=lite
126+
elif gh pr list --base develop --json number,state,draft | jq 'any(.[]; .state == "OPEN" or .draft == true)'; then
127+
TEST_MODE=lite
128+
elif gh pr list --base main --json number,state,draft | jq 'any(.[]; .state == "OPEN" or .draft == true)'; then
129+
TEST_MODE=full
130+
fi
131+
echo "test_mode=${TEST_MODE}"
132+
echo "test_mode=${TEST_MODE}" >> $GITHUB_OUTPUT
133+
110134
build-stages:
111135
name: Build multistage image stages
112-
needs: check-updated-preconfigs
113-
uses: ./.github/workflows/build_and_test.yml
136+
needs:
137+
- check_pr
138+
- check-updated-preconfigs
139+
uses: ./.github/workflows/build_and_test.yaml
114140
secrets: inherit
115141
with:
116142
phase_one: ${{ needs.check-updated-preconfigs.outputs.phase_one }}
@@ -119,3 +145,4 @@ jobs:
119145
rebuild_phase_two: ${{ needs.check-updated-preconfigs.outputs.rebuild_phase_two }}
120146
phase_three: ${{ needs.check-updated-preconfigs.outputs.phase_three }}
121147
rebuild_phase_three: ${{ needs.check-updated-preconfigs.outputs.rebuild_phase_three }}
148+
test_mode: ${{ needs.check_pr.outputs.test_mode }}

.github/workflows/regression_test_full.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/regression_test_lite.yml

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)