Skip to content

Commit 64a2bee

Browse files
committed
wip: testing child pipelines
1 parent 8302080 commit 64a2bee

2 files changed

Lines changed: 24 additions & 42 deletions

File tree

.gitlab-ci.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -149,20 +149,19 @@ build:linux:
149149
- >
150150
nix-shell --run '
151151
npm run build --verbose;
152-
npm test -- --ci --coverage;
153152
'
154153
artifacts:
155154
when: always
156-
reports:
157-
junit:
158-
- ./tmp/junit/junit.xml
159-
coverage_report:
160-
coverage_format: cobertura
161-
path: ./tmp/coverage/cobertura-coverage.xml
155+
# reports:
156+
# junit:
157+
# - ./tmp/junit/junit.xml
158+
# coverage_report:
159+
# coverage_format: cobertura
160+
# path: ./tmp/coverage/cobertura-coverage.xml
162161
paths:
163162
# Only the build:linux preserves the dist
164163
- ./dist
165-
coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
164+
# coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
166165
rules:
167166
# Runs on staging commits and ignores version commits
168167
- if: $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
@@ -183,11 +182,11 @@ build:windows:
183182
- $env:Path = "$(npm bin);" + $env:Path
184183
- npm run build --verbose
185184
# - npm test -- --ci
186-
artifacts:
187-
when: always
188-
reports:
189-
junit:
190-
- ./tmp/junit/junit.xml
185+
# artifacts:
186+
# when: always
187+
# reports:
188+
# junit:
189+
# - ./tmp/junit/junit.xml
191190
rules:
192191
# Runs on staging commits and ignores version commits
193192
- if: $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
@@ -212,11 +211,11 @@ build:macos:
212211
- export PATH="$(npm bin):$PATH"
213212
- npm run build --verbose
214213
# - npm test -- --ci
215-
artifacts:
216-
when: always
217-
reports:
218-
junit:
219-
- ./tmp/junit/junit.xml
214+
# artifacts:
215+
# when: always
216+
# reports:
217+
# junit:
218+
# - ./tmp/junit/junit.xml
220219
rules:
221220
# Runs on staging commits and ignores version commits
222221
- if: $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/

scripts/test-pipelines.sh

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,13 @@ variables:
2727
# It must use an absolute path, otherwise ts-node calls will CWD
2828
TS_CACHED_TRANSPILE_CACHE: "${CI_PROJECT_DIR}/tmp/ts-node-cache"
2929
TS_CACHED_TRANSPILE_PORTABLE: "true"
30-
# Homebrew cache only used by macos runner
31-
HOMEBREW_CACHE: "${CI_PROJECT_DIR}/tmp/Homebrew"
3230
3331
# Cached directories shared between jobs & pipelines per-branch per-runner
3432
cache:
3533
key: $CI_COMMIT_REF_SLUG
3634
paths:
3735
- ./tmp/npm/
3836
- ./tmp/ts-node-cache/
39-
# Homebrew cache is only used by the macos runner
40-
- ./tmp/Homebrew
4137
# `jest` cache is configured in jest.config.js
4238
- ./tmp/jest/
4339
@@ -46,20 +42,6 @@ EOF
4642

4743
printf "\n"
4844

49-
# # SPECIAL CASE
50-
# cat << EOF
51-
# test binagent:
52-
# image: registry.gitlab.com/matrixai/engineering/maintenance/gitlab-runner
53-
# stage: test
54-
# interruptible: true
55-
# script:
56-
# - >
57-
# nix-shell -I nixpkgs=./pkgs.nix --packages nodejs --run '
58-
# npm ci;
59-
# npm test -- ./tests/bin/agent;
60-
# '
61-
# EOF
62-
6345
# Each test directory has its own job
6446
for test_dir in tests/**/*/; do
6547
test_files=("$test_dir"*.test.ts)
@@ -78,17 +60,13 @@ check:test $test_dir:
7860
- >
7961
nix-shell --run '
8062
npm run build --verbose;
81-
npm test -- --ci --coverage ${test_files[@]};
63+
npm test -- --ci ${test_files[@]};
8264
'
8365
artifacts:
8466
when: always
8567
reports:
8668
junit:
8769
- ./tmp/junit/junit.xml
88-
coverage_report:
89-
coverage_format: cobertura
90-
path: ./tmp/coverage/cobertura-coverage.xml
91-
coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
9270
EOF
9371
printf "\n"
9472
done
@@ -103,6 +81,11 @@ check:test index:
10381
- >
10482
nix-shell --run '
10583
npm run build --verbose;
106-
npm test -- --ci --coverage ${test_files[@]};
84+
npm test -- --ci ${test_files[@]};
10785
'
86+
artifacts:
87+
when: always
88+
reports:
89+
junit:
90+
- ./tmp/junit/junit.xml
10891
EOF

0 commit comments

Comments
 (0)