jasonraimondi/zod-friendly-forms

View on GitHub
.github/workflows/test.yml

Summary

Maintainability
Test Coverage
name: Continuous Integration

on:
  pull_request:
  push:

jobs:
  test:
    if: "!contains(github.event.head_commit.message, '[skip ci]')"
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: denoland/setup-deno@v1
        with:
          deno-version: 1.x
      - run: deno fmt --check
      - run: deno test --coverage=./coverage
      - run: deno coverage ./coverage --lcov --output=coverage/lcov.info
      - if: github.event_name == 'push' && github.ref == 'refs/heads/main'
        name: report coverage to code climate
        run: |
          curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
          chmod +x ./cc-test-reporter
          ./cc-test-reporter format-coverage -t lcov coverage/lcov.info
          ./cc-test-reporter upload-coverage
        env:
          CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}

  publish-jsr:
    needs: test
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write
    steps:
      - uses: actions/checkout@v4
      - run: npx jsr publish