Skip to content

Commit 02c8130

Browse files
y3rshcaila-marashaj
authored andcommitted
chore(ci): adjust codecov settings and update step-generation workflow (#17424)
- Most js projects were not uploading to codecov before the change in #17406 to produce lcov output. - Now that they are, we don't want ❌ everywhere so let us adjust the patch threshold and catch up the ignore list. - Tackle any specific areas of coverage deficit strategically. - In addition convert `.github/workflows/step-generation-test.yaml` to the pattern of PD like in #17406
1 parent 3b31ba4 commit 02c8130

File tree

4 files changed

+62
-48
lines changed

4 files changed

+62
-48
lines changed

.codecov.yml

+47-19
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,55 @@
1+
version: 2.0
2+
3+
coverage:
4+
status:
5+
project:
6+
default:
7+
target: auto
8+
threshold: '10'
9+
patch:
10+
default:
11+
target: auto
12+
threshold: 0
13+
14+
comment:
15+
layout: 'reach, diff, flags, files'
16+
117
ignore:
2-
- '**/node_modules'
3-
- 'webpack-config'
4-
- 'hardware-testing'
5-
- '**/*.md'
6-
- '**/*.yaml'
18+
- 'webpack-config/**'
19+
- 'hardware-testing/**'
20+
- 'abr-testing/**'
21+
- 'test-data-generation/**'
22+
- 'performance-metrics/**'
23+
- 'package-testing/**'
24+
- 'opentrons-ai-server/**'
25+
- 'opentrons-ai-client/**'
26+
- 'g-code-testing/**'
27+
- 'api-client/**'
28+
- 'analyses-snapshot-testing/**'
29+
- '.storybook/**'
30+
- 'react-api-client/**'
31+
- 'scripts/**'
32+
- '.github/**'
33+
- '**/build/**'
34+
- '**/dist/**'
35+
- '**/node_modules/**'
36+
- '**/{test,tests,__tests__,__mocks__,mocks}/**'
37+
- '**/*.{md,yaml,yml,json,rst}'
738
- '**/Makefile'
8-
- '**/*.in'
9-
- '**/*.json'
10-
- '**/*.config.js'
39+
- '**/*.{in,ini,lock,toml,cfg}'
40+
- '**/setup.py'
41+
- '**/requirements.txt'
42+
- '**/.flake8'
43+
- '**/.coveragerc'
44+
- '**/.prettierrc.js'
45+
- '**/.eslintrc.js'
46+
- '**/Pipfile'
47+
- '**/Dockerfile*'
48+
- '**/*.{config.js,config.ts}'
1149
- '**/*.mk'
1250
- '**/*.stories.tsx'
13-
14-
comment:
15-
# add flags to `layout` configuration to show up in the PR comment
16-
layout: 'reach, diff, flags, files'
51+
- '**/*.{mjs,css,cjs,mts}'
1752

1853
flag_management:
1954
default_rules:
2055
carryforward: true
21-
22-
coverage:
23-
status:
24-
project:
25-
default:
26-
target: auto
27-
threshold: 10

.github/workflows/step-generation-test.yaml

+12-26
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,18 @@ on:
99
- 'shared-data/**'
1010
- 'package.json'
1111
- '.github/workflows/step-generation-test.yaml'
12+
- '.github/actions/js/setup/action.yml'
13+
- '.github/actions/git/resolve-tag/action.yml'
14+
- '.github/actions/environment/complex-variables/action.yml'
1215
push:
1316
paths:
1417
- 'step-generation/**'
1518
- 'shared-data/**'
1619
- 'package.json'
1720
- '.github/workflows/step-generation-test.yaml'
21+
- '.github/actions/js/setup/action.yml'
22+
- '.github/actions/git/resolve-tag/action.yml'
23+
- '.github/actions/environment/complex-variables/action.yml'
1824
branches:
1925
- '*'
2026

@@ -33,35 +39,15 @@ jobs:
3339
js-unit-test:
3440
name: 'step generation unit tests'
3541
runs-on: 'ubuntu-24.04'
36-
timeout-minutes: 30
42+
timeout-minutes: 20
3743
steps:
38-
- uses: 'actions/checkout@v4'
39-
- uses: 'actions/setup-node@v4'
40-
with:
41-
node-version: '22.11.0'
42-
- name: 'install udev for usb-detection'
43-
run: |
44-
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
45-
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
46-
sudo apt-get update && sudo apt-get install libudev-dev
47-
- name: 'cache yarn cache'
48-
uses: actions/cache@v3
49-
with:
50-
path: |
51-
${{ github.workspace }}/.yarn-cache
52-
${{ github.workspace }}/.npm-cache
53-
key: js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
54-
restore-keys: |
55-
js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-
56-
- name: 'setup-js'
57-
run: |
58-
npm config set cache ./.npm-cache
59-
yarn config set cache-folder ./.yarn-cache
60-
make setup-js
44+
- name: 'Checkout Repository'
45+
uses: actions/checkout@v4
46+
- uses: ./.github/actions/js/setup
6147
- name: 'run step generation unit tests'
6248
run: make -C step-generation test-cov
6349
- name: 'Upload coverage report'
64-
uses: codecov/codecov-action@v3
50+
uses: codecov/codecov-action@v5
6551
with:
66-
files: ./coverage/lcov.info
6752
flags: step-generation
53+
token: ${{ secrets.CODECOV_TOKEN }}

NOTICE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Opentrons Platform
2-
Copyright 2015-2020 Opentrons Labworks, Inc.
2+
Copyright 2015-2025 Opentrons Labworks, Inc.
33

44
The source code in this repository is licensed under the Apache License,
55
Version 2.0 (the "License"); you may not use this code except in

step-generation/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# using bash instead of /bin/bash in SHELL prevents macOS optimizing away our PATH update
44
SHELL := bash
55

6-
# These variables can be overriden when make is invoked to customize the
6+
# These variables can be overridden when make is invoked to customize the
77
# behavior of jest
88
tests ?=
9-
cov_opts ?= --coverage=true
9+
cov_opts ?= --coverage --pool=threads
1010
test_opts ?=
1111

1212
.PHONY: test

0 commit comments

Comments
 (0)