Unverified Commit 715bcf0e authored by Hong Minhee's avatar Hong Minhee
Browse files

Run tests on GitHub Actions

parent acd01844
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
name: main
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    permissions:
      checks: write
      pull-requests: write
    services:
      redis:
        image: redis
        options: >-
          --health-cmd "redis-cli ping"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
        - 6379:6379
    steps:
    - uses: actions/checkout@v4
    - uses: denoland/setup-deno@v1
      with:
        deno-version: v1.x
    - uses: actions/setup-node@v4
      with:
        node-version: lts/*
    - uses: oven-sh/setup-bun@v1
      with:
        bun-version: latest
    - run: deno task test --junit-path=.test-report.xml
    - uses: EnricoMi/publish-unit-test-result-action@v2
      if: always()
      with:
        files: .test-report.xml
    - run: deno task check
    - run: deno task dnt
    - run: bun run ./test_runner.js
      working-directory: ${{ github.workspace }}/npm/
+2 −0
Original line number Diff line number Diff line
<!-- deno-fmt-ignore-file -->

@fedify/redis
=============

+5 −0
Original line number Diff line number Diff line
@@ -12,7 +12,12 @@
    "@std/assert": "jsr:@std/assert@^0.226.0",
    "ioredis": "npm:ioredis@^5.4.0"
  },
  "exclude": [
    "npm",
    "*.md"
  ],
  "tasks": {
    "check": "deno fmt --check && deno lint && deno check */*.ts",
    "test": "deno test --allow-net --allow-env",
    "dnt": "deno run -A dnt.ts"
  }