diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..50bff09d --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,28 @@ +name: coverage +on: + push: + branches: + - master +jobs: + perl6: + runs-on: ubuntu-latest + container: + image: fernandocorrea/red-tester-no-run + steps: + - uses: actions/checkout@v2 + - name: Run test coverage + run: | + racoco --fail-level=$(cat .coverage) --exec='zef test -v .' --html | raku -ne 'say $.floor if /^ "Coverage:" <.ws> $=[\d+\.\d+] "%" $/' > .coverage + rm -rf docs/coverage + mkdir -p docs/coverage/ + mv .racoco/* docs/coverage/ + - name: Commit files + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add . + git commit -m "Coverage" -a || true + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/create-docs.yml b/.github/workflows/create-docs.yml index f0a03d63..55c5b266 100644 --- a/.github/workflows/create-docs.yml +++ b/.github/workflows/create-docs.yml @@ -13,12 +13,6 @@ jobs: - name: Create local changes run: | raku tools/make-docs.raku - - name: Run test coverage - run: | - racoco --fail-level=$(cat .coverage) --exec='zef test -v .' --html | raku -ne 'say $.floor if /^ "Coverage:" <.ws> $=[\d+\.\d+] "%" $/' > .coverage - rm -rf docs/coverage - mkdir -p docs/coverage/ - mv .racoco/* docs/coverage/ - name: Commit files run: | git config --local user.email "action@github.com"