Skip to content

fix: Update ci-publish.yml #10

fix: Update ci-publish.yml

fix: Update ci-publish.yml #10

Workflow file for this run

name: Run Tests and Check Coverage
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
# Checkout the code
- name: Checkout repository
uses: actions/checkout@v3
# Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
# Cache yarn dependencies
- name: Cache yarn dependencies
uses: actions/cache@v3
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# Install dependencies
- name: Install dependencies
run: yarn install
# Run tests
- name: Run tests
run: yarn test
# Run coverage
- name: Run coverage
run: yarn coverage
# Upload coverage results
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}