main.yml 604 B

1234567891011121314151617181920212223242526272829303132
  1. name: Swift
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. jobs:
  8. build:
  9. runs-on: macos-latest
  10. steps:
  11. - uses: actions/checkout@v2
  12. - name: Build
  13. run: swift build
  14. - name: Run tests
  15. run: swift test --enable-code-coverage
  16. - name: Get test coverage
  17. uses: ./.github/actions/spm-lcov-action
  18. with:
  19. output-file: ./coverage/lcov.info
  20. - name: Report test coverage
  21. uses: romeovs/lcov-reporter-action@v0.2.16
  22. with:
  23. github-token: ${{ secrets.GITHUB_TOKEN }}
  24. lcov-file: ./coverage/lcov.info