-
Notifications
You must be signed in to change notification settings - Fork 178
91 lines (85 loc) · 2.59 KB
/
robot-server-lint-test.yaml
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
# 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/**/*'
- 'notify-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/**/*'
- 'notify-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-test:
name: 'robot server package linting and tests'
timeout-minutes: 40
runs-on: 'ubuntu-22.04'
strategy:
matrix:
with-ot-hardware: ['true', 'false']
steps:
- uses: 'actions/checkout@v3'
with:
fetch-depth: 0
- uses: 'actions/setup-node@v3'
with:
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.10'
- uses: './.github/actions/python/setup'
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
- if: ${{ matrix.with-ot-hardware == 'false' }}
name: Test without opentrons_hardware
run: make -C robot-server test-cov test_opts="-m 'not ot3_only'"
- if: ${{ matrix.with-ot-hardware == 'true' }}
name: Test with opentrons_hardware
run: make -C robot-server test-cov
- name: Ensure assets build
run: make -C robot-server sdist wheel
- name: Upload coverage report
uses: 'codecov/codecov-action@v3'
with:
files: ./robot-server/coverage.xml
flags: robot-server