我一直在使用 Travis 和 sbt-scoverage + sbt-coveralls,现在想试试 Github Actions。
我已经能够在我的 Action 中进行覆盖,但是 Coveralls.io 的 GitHub Action 失败了,因为没有lcov.info
生成文件。我不知道覆盖率会生成lcov.info
(是吗?)。
有没有人成功使用 GitHub Actions 和 sbt + coverage + 工作服?
这是我的动作脚本:
name: My Scala CI
on: ["push", "pull_request"]
jobs:
build:
name: My CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Set up JDK 13
uses: actions/setup-java@v1
with:
java-version: '13.0.1'
- name: Run tests
uses: lokkju/github-action-sbt@master
with:
commands: '+ test'
- name: Generate coverage report (1 of 5 - clean)
uses: lokkju/github-action-sbt@master
with:
commands: 'clean'
- name: Generate coverage report (2 of 5 - coverage)
uses: lokkju/github-action-sbt@master
with:
commands: 'coverage'
- name: Generate coverage report (3 of 5 - test)
uses: lokkju/github-action-sbt@master
with:
commands: 'test'
- name: Generate coverage report (4 of 5 - coverageAggregate)
uses: lokkju/github-action-sbt@master
with:
commands: 'coverageAggregate'
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.COVERALLS }}