-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (49 loc) · 1.34 KB
/
tests.yml
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
# This workflow will install MLIR, Python dependencies, run tests and lint with a single version of Python
name: Tests
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
Test:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
pip install --upgrade pip
- name: Install the package locally
run: |
pip install -e ".[extras]"
- name: Execute lit tests
run: |
lit -v tests/filecheck/
lit -v tests/filecheck/ -DCOVERAGE
- name: Combine coverage data
run: |
coverage combine --append
coverage report
coverage xml
- name: Upload coverage to Codecov
if: matrix.python-version == '3.11'
uses: Wandalen/wretry.action@v1
with:
action: codecov/codecov-action@v4
attempt_delay: 10000
attempt_limit: 10
with: |
fail_ci_if_error: true
verbose: true
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}