Slide 34
Slide 34 text
ϫʔΫϑϩʔͷ
༷ࢠ
jobs
:
test
:
strategy
:
# ׂͨ͠ςετͷ͏ͪ, 1͕ͭίέͯଞͷશͯΛcancel͠ͳ͍Α͏ʹ͢Δ
fail-fast: fals
e
matrix
:
test_id: ["01", "02", "03"] # ࿈൪Λࢦఆ
steps
:
... ॾʑͷ४උ ..
.
# findͱsplitΛͬͯ, ςετରͱͳΔϑΝΠϧ໊͕ॻ͔Εͨ
# test01, test02, test03 ͱ͍͏ϑΝΠϧΛ࡞
- name: Split tests into chunk
s
run:
|
find t -name "*.t" -not -type d > test_files.tx
t
split -n r/${{ strategy.job-total }}
\
--numeric-suffixes=1
\
--elide-empty-files test_files.txt tes
t
# ↑Ͱ࡞ͬͨ test01, test02, test03ͷ͍ͣΕ͔Λରͱͯ͠
# ςετΛ࣮ߦ͢Δ
- name: tes
t
run:
|
docker-compose run --rm --no-deps app
\
carton exec -- prove < test${{ matrix.test_id }}
※ 3ׂͷྫ