-
Notifications
You must be signed in to change notification settings - Fork 12
95 lines (79 loc) · 2.22 KB
/
Copy pathtest.yml
File metadata and controls
95 lines (79 loc) · 2.22 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
name: Legacy Tests
on:
push:
branches:
- "develop"
workflow_dispatch:
permissions:
contents: read
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
group: [1, 2, 3, 4, 5, 6, 7, 8]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup environment
uses: ./.github/actions/setup-environment
- name: Test with pytest
timeout-minutes: 5
run: |
uv run pytest \
-n auto \
--cov src \
--splits 8 --group ${{ matrix.group }} \
--timeout 15 \
-o junit_suite_name="${{github.job}}-${{ matrix.group }}" \
tests/unit
- uses: ./.github/actions/report
with:
flag: unit-tests
codecov_token: ${{ secrets.CODECOV_TOKEN }}
parse-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-environment
- name: Cache oss-repos
uses: ./.github/actions/setup-oss-repos
- name: Install yarn and pnpm
run: |
npm install -g yarn &
npm install -g pnpm
- name: Test with pytest
timeout-minutes: 15
env:
GITHUB_WORKSPACE: $GITHUB_WORKSPACE
run: |
uv run pytest \
-n auto \
-o junit_suite_name="${{github.job}}" \
tests/integration/codemod/test_parse.py
- uses: ./.github/actions/report
with:
flag: no-flag
codecov_token: ${{ secrets.CODECOV_TOKEN }}
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-environment
- name: Test with pytest
timeout-minutes: 5
env:
GITHUB_WORKSPACE: $GITHUB_WORKSPACE
GITHUB_TOKEN: ${{ secrets.GHA_PAT }}
run: |
uv run pytest \
-n auto \
-o junit_suite_name="${{github.job}}" \
tests/integration/codegen
- uses: ./.github/actions/report
with:
flag: integration-tests
codecov_token: ${{ secrets.CODECOV_TOKEN }}