diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9c9ae03..8c5ebb5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,30 +1,27 @@ -on: ["push", "pull_request"] +on: ['push', 'pull_request'] name: Test Coveralls jobs: - build: name: Build runs-on: ubuntu-latest steps: + - uses: actions/checkout@v1 - - uses: actions/checkout@v1 - - - name: Use Node.js 18.x - uses: actions/setup-node@v1 - with: - node-version: 18.x + - name: Use Node.js 18.x + uses: actions/setup-node@v1 + with: + node-version: 18.x - - name: yarn install, yarn test:coverage - run: | - yarn install - echo repo_token: ${{ secrets.COVERALLS_REPO_TOKEN }} > .coveralls.yml - yarn test:coverage + - name: yarn install, yarn test:coverage + run: | + yarn install + echo repo_token: ${{ secrets.COVERALLS_REPO_TOKEN }} > .coveralls.yml + yarn test:coverage - - name: Coveralls - uses: coverallsapp/github-action@master - env: - NODE_COVERALLS_DEBUG: 1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Coveralls + uses: coverallsapp/github-action@master + if: ${{ secrets.GITHUB_TOKEN != '' && github.event_name != 'pull_request' }} + with: + github-token: ${{ secrets.GITHUB_TOKEN }}