-
Notifications
You must be signed in to change notification settings - Fork 4
69 lines (65 loc) · 1.95 KB
/
test.yaml
File metadata and controls
69 lines (65 loc) · 1.95 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
name: test CI
permissions:
contents: read
packages: read
actions: read
on:
pull_request:
branches:
- main
- v*
types:
- opened
- synchronize
- reopened
# NOTE(20241016): this is a workaround for PR with head
# updated by gen_requirements_txt workflow
- review_requested
- assigned
push:
branches:
- main
- v*
paths:
- "src/**"
- "tests/**"
- ".github/workflows/test.yaml"
# allow the test CI to be manually triggerred
workflow_dispatch:
jobs:
pytest_directly_on_supported_os:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
test_base:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
steps:
- name: Checkout commit
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Execute pytest with coverage trace under ota-test_base container
run: |
mkdir -p test_result
docker compose -f docker/test_base/docker-compose_tests.yml run --rm tester-${{ matrix.test_base }}
# NOTE: we only intend to test otaclient with python3.13 on
# ubuntu 22.04, as this is the setup for the otaclient app image build.
pytest_with_py313_on_ubuntu_2204:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout commit
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
# sonarcloud needs full git histories
with:
fetch-depth: 0
- name: Execute pytest with coverage trace under ota-py313-app container
run: |
mkdir -p test_result
docker compose -f docker/test_base/docker-compose_tests_py313.yml run --rm tester-ubuntu-22.04
- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@299e4b793aaa83bf2aba7c9c14bedbb485688ec4 # v7.1.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}