@@ -14,7 +14,7 @@ concurrency:
14
14
jobs :
15
15
test :
16
16
name : Tests and coverage
17
- runs-on : ubuntu-latest-16core
17
+ runs-on : ubuntu-latest
18
18
env :
19
19
HATCH_ENV : " ci"
20
20
# Workaround for read-only dependabot GITHUB_TOKEN in meow-coverage
@@ -27,24 +27,21 @@ jobs:
27
27
python-version : [ "3.9", "3.10", "3.11" ]
28
28
steps :
29
29
- uses : actions/checkout@v4
30
- with :
31
- path : head
30
+
32
31
- name : Set up Python ${{ matrix.python-version }}
33
32
uses : actions/setup-python@v4
34
33
with :
35
34
python-version : ${{ matrix.python-version }}
36
35
cache : pip
37
36
38
37
- name : Install dependencies
39
- working-directory : head
40
38
run : |
41
39
python -m pip install --upgrade pip
42
40
python -m pip install hatch
43
41
44
42
- name : Formatting
45
43
uses : famedly/black@stable
46
44
with :
47
- src : head
48
45
options : " --check --verbose"
49
46
50
47
- name : Prepare lint
@@ -55,46 +52,12 @@ jobs:
55
52
uses : chartboost/ruff-action@491342200cdd1cf4d5132a30ddc546b3b5bc531b
56
53
with :
57
54
args : check --target-version ${{ env.PYTHON_TARGET }}
58
- src : head
59
55
60
56
- name : Tests and coverage
61
- working-directory : head
62
- run : hatch run head-cov
63
-
64
- - name : Load base coverage results from cache
65
- if : github.event_name == 'pull_request'
66
- id : cache-coverage
67
- uses : actions/cache@v3
68
- with :
69
- path : ./base.lcov
70
- key : coverage-${{ github.event.pull_request.base.sha }}
71
-
72
- - name : Pull base
73
- uses : actions/checkout@v3
74
- if : github.event_name == 'pull_request' && steps.cache-coverage.outputs.cache-hit != 'true'
57
+ run : hatch run cov
58
+
59
+ - name : Codecov - Upload coverage
60
+ uses : codecov/codecov-action@v4
75
61
with :
76
- ref : ${{ github.event.pull_request.base.ref }}
77
- repository : ${{ github.event.pull_request.base.full_name }}
78
- path : base
79
-
80
- - name : Generate base coverage
81
- if : github.event_name == 'pull_request' && steps.cache-coverage.outputs.cache-hit != 'true'
82
- working-directory : base
83
- # Needed for initial run
84
- continue-on-error : true
85
- run : hatch run base-cov
86
-
87
- - name : Meow Coverage
88
- id : coverage-report
89
- continue-on-error : true
90
- uses : famedly/meow-coverage@main
91
- if : github.event_name == 'pull_request'
92
- with :
93
- new-lcov-file : ' head.lcov'
94
- old-lcov-file : ${{ github.event_name == 'pull_request' && 'base.lcov' || '' }}
95
- source-prefix : ' synapse_invite_policies/'
96
- pr-number : ${{ github.event_name == 'pull_request' && github.event.pull_request.number || '' }}
97
- repo-name : ${{ github.repository }}
98
- commit-id : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.event.after }}
99
- github-token : ${{ secrets.GITHUB_TOKEN }}
100
-
62
+ token : ${{secrets.CODECOV_TOKEN}}
63
+ files : " lcov.info"
0 commit comments