forked from jxmorris12/language_tool_python
-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (94 loc) Β· 2.93 KB
/
Copy pathtest.yml
File metadata and controls
109 lines (94 loc) Β· 2.93 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
name: language_tool_python CI
permissions:
contents: read
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
timeout-minutes: 20
name: Test on ${{ matrix.os }} Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
permissions:
contents: read
id-token: write # Required for Codecov OIDC authentication
strategy:
fail-fast: false
matrix:
# Execute tests on python 3.10-3.15 on ubuntu
# and python 3.14 on macOS and windows
include:
- os: ubuntu-26.04
python-version: "3.10"
- os: ubuntu-26.04
python-version: "3.11"
- os: ubuntu-26.04
python-version: "3.12"
- os: ubuntu-26.04
python-version: "3.13"
- os: ubuntu-26.04
python-version: "3.14"
- os: ubuntu-26.04
python-version: "3.15.0-beta.3"
- os: macos-26
python-version: "3.14"
- os: windows-2025
python-version: "3.14"
steps:
- name: Install uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # 8.3.2
- name: Set up JDK 26
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # 5.6.0
with:
distribution: 'temurin'
java-version: '26'
- name: Clone repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1
with:
persist-credentials: false
- name: Test with pytest
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
uv run --python "$PYTHON_VERSION" --group tests --locked pytest
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-26.04' && matrix.python-version == '3.14'
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
use_oidc: true
files: ./coverage.xml
fail_ci_if_error: false
lint:
timeout-minutes: 10
name: Lint with Ruff
runs-on: ubuntu-26.04
steps:
- name: Install uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # 8.3.2
- name: Clone repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1
with:
persist-credentials: false
- name: Run Ruff Linter
run: |
make ruff-check
type_check:
timeout-minutes: 10
name: Type Check with Mypy
runs-on: ubuntu-26.04
steps:
- name: Install uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # 8.3.2
- name: Clone repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1
with:
persist-credentials: false
- name: Run Mypy Type Checker
run: |
make mypy-check