-
Notifications
You must be signed in to change notification settings - Fork 200
135 lines (129 loc) · 4.12 KB
/
robot-server-lint-test.yaml
File metadata and controls
135 lines (129 loc) · 4.12 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# This workflow runs test and lint on branch pushes that touch the
# robot-server project or its dependencies
name: 'Robot server lint/test'
on:
# Most of the time, we run on pull requests, which lets us handle external PRs
push:
paths:
- 'api/**/*'
- 'hardware/**/*'
- 'Makefile'
- 'shared-data/**/*'
- 'server-utils/**/*'
- '!shared-data/js/**/*'
- 'robot-server/**/*'
- 'scripts/**/*.mk'
- 'scripts/**/*.py'
- '.github/workflows/robot-server-lint-test.yaml'
- '.github/actions/python/**'
branches:
- 'edge'
- 'release'
- '*hotfix*'
tags-ignore:
- '*'
pull_request:
paths:
- 'api/**/*'
- 'hardware/**/*'
- 'Makefile'
- 'shared-data/**/*'
- 'server-utils/**/*'
- '!shared-data/js/**/*'
- 'robot-server/**/*'
- 'scripts/**/*.mk'
- 'scripts/**/*.py'
- '.github/workflows/robot-server-lint-test.yaml'
- '.github/actions/python/**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.ref_name != 'edge' || github.run_id}}-${{ github.ref_type != 'tag' || github.run_id }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
lint:
name: 'robot server package linting'
timeout-minutes: 5
runs-on: 'ubuntu-24.04'
strategy:
matrix:
with-ot-hardware: ['true', 'false']
steps:
- uses: 'actions/checkout@v4'
with:
fetch-depth: 0
- uses: 'actions/setup-node@v6'
with:
node-version: '22.22.0'
- uses: './.github/actions/python/setup-uv'
with:
project: 'robot-server'
- if: ${{ matrix.with-ot-hardware == 'false' }}
name: Remove OT-3 hardware package
run: make -C robot-server setup-ot2
- name: Lint
run: make -C robot-server lint
test-unit:
name: 'robot server package unit testing (ot_hardware: ${{matrix.with-ot-hardware}})'
timeout-minutes: 5
runs-on: 'ubuntu-24.04'
strategy:
matrix:
with-ot-hardware: ['true', 'false']
steps:
- uses: 'actions/checkout@v4'
with:
fetch-depth: 0
- uses: 'actions/setup-node@v6'
with:
node-version: '22.22.0'
- uses: './.github/actions/python/setup-uv'
with:
project: 'robot-server'
- if: ${{ matrix.with-ot-hardware == 'false' }}
name: Remove OT-3 hardware package
run: make -C robot-server setup-ot2
- if: ${{ matrix.with-ot-hardware == 'false' }}
name: Test without opentrons_hardware
run: make -C robot-server test-unit-cov test_opts="-m 'not ot3_only'"
- if: ${{ matrix.with-ot-hardware == 'true' }}
name: Test with opentrons_hardware
run: make -C robot-server test-unit-cov
- name: Upload coverage report
uses: 'codecov/codecov-action@v3'
with:
files: ./robot-server/coverage.xml
flags: robot-server
test-integration:
name: 'robot server package integration testing (ot_hardware: ${{matrix.with-ot-hardware}})'
timeout-minutes: 40
runs-on: 'ubuntu-24.04'
strategy:
matrix:
with-ot-hardware: ['true', 'false']
steps:
- uses: 'actions/checkout@v4'
with:
fetch-depth: 0
- uses: 'actions/setup-node@v6'
with:
node-version: '22.22.0'
- uses: './.github/actions/python/setup-uv'
with:
project: 'robot-server'
- if: ${{ matrix.with-ot-hardware == 'false' }}
name: Remove OT-3 hardware package
run: make -C robot-server setup-ot2
- if: ${{ matrix.with-ot-hardware == 'false' }}
name: Test without opentrons_hardware
run: make -C robot-server test-integration-cov test_opts="-m 'not ot3_only'"
- if: ${{ matrix.with-ot-hardware == 'true' }}
name: Test with opentrons_hardware
run: make -C robot-server test-integration-cov
- name: Upload coverage report
uses: 'codecov/codecov-action@v3'
with:
files: ./robot-server/coverage.xml
flags: robot-server