Skip to content

ci: added coverage report by Codecov #493

ci: added coverage report by Codecov

ci: added coverage report by Codecov #493

name: Vercel Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
pull_request:
branches:
- '**'
jobs:
UnitTest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install npm packages
run: yarn
- name: Static code analysis
run: yarn lint
- name: Unit test
run: yarn test
- name: coverage
run: yarn test:coverage
- name: Upload coverage to Codecov
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} Deploy-Preview:

Check failure on line 31 in .github/workflows/vercel-preview-development.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/vercel-preview-development.yaml

Invalid workflow file

You have an error in your yaml syntax on line 31
runs-on: ubuntu-latest
needs: [UnitTest]
if: success()
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: |
DEPLOY_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})
echo "DEPLOY_URL=$DEPLOY_URL" >> $GITHUB_ENV
- name: Notify Slack
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ secrets.DIGITIZER_DEV_SLACK_WEBHOOK }}
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: |
Preview URL: ${{ env.DEPLOY_URL }}