I'm trying to set up a GitHub Action to run build and coverage report using Jest but the workflow that I have set up seems wrong:
# Configure integration.
name: 👷 Build
# Triggers the workflow on push or pull request events
on: [push, pull_request]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out the repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2
# Install dependencies
- name: Install
run: yarn install
# Build the app
- name: Build
run: yarn build
# Get test coverage
- uses: ziishaned/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
test-command: 'yarn test:unit:coverage'