@@ -71,20 +71,27 @@ Sample ``.coveralls.yml`` file::
71
71
Github Actions support
72
72
----------------------
73
73
74
- Coveralls natively supports jobs running on Github Actions. You can directly pass the default-provided secret GITHUB_TOKEN::
74
+ Coveralls natively supports jobs running on Github Actions. You can directly
75
+ pass the default-provided secret GITHUB_TOKEN::
75
76
76
77
env:
77
78
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78
79
run: |
79
- coveralls
80
+ coveralls --service=github
80
81
81
82
Passing a coveralls.io token via the ``COVERALLS_REPO_TOKEN `` environment variable
82
83
(or via the ``repo_token `` parameter in the config file) is not needed for
83
84
Github Actions.
84
85
85
- Sometimes Github Actions gets a little picky about the service name which needs to
86
- be used in various cases. If you run into issues, try setting the ``COVERALLS_SERVICE_NAME ``
87
- explicitly to either ``github `` or ``github-actions ``.
86
+ Sometimes Github Actions gets a little picky about the service name which needs
87
+ to be used in various cases. If you run into issues, try setting the
88
+ ``COVERALLS_SERVICE_NAME `` explicitly to either ``github `` or
89
+ ``github-actions ``. It seems to be the case that you should use the
90
+ ``--service=github `` value if you are also planning to use the ``GITHUB_TOKEN ``
91
+ env var, and ``github-actions `` (which is the default) in any other case, but
92
+ we've have conflicting reports on this: YMMV! See
93
+ `#452 <https://github.com/TheKevJames/coveralls-python/issues/252 >`_ for more
94
+ info.
88
95
89
96
For parallel builds, you have to add a final step to let coveralls.io know the
90
97
parallel build is finished::
@@ -103,7 +110,7 @@ parallel build is finished::
103
110
- name: Test
104
111
run: ./run_tests.sh ${{ matrix.test-name }}
105
112
- name: Upload coverage data to coveralls.io
106
- run: coveralls
113
+ run: coveralls --service=github
107
114
env:
108
115
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109
116
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
@@ -117,7 +124,7 @@ parallel build is finished::
117
124
- name: Finished
118
125
run: |
119
126
pip3 install --upgrade coveralls
120
- coveralls --finish
127
+ coveralls --service=github -- finish
121
128
env:
122
129
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123
130
0 commit comments