name: Build
on: [push, pull_request]
jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        deno: [1.x, "1.31.x", canary]
    steps:
      - uses: actions/checkout@v3
      - uses: denoland/setup-deno@v1
        with:
          deno-version: ${{ matrix.deno }}
      - name: Check fmt
        run: deno fmt --check
      - name: Run lint
        run: deno lint
      - name: All entries
        uses: tj-actions/glob@v16
        id: entries
        with:
          files: |
            s3si.ts
            initRank.ts
            ./scripts/*.ts
      - name: Check entries
        run: deno check ${{ steps.entries.outputs.paths }}
      - name: Run tests
        run: deno test
