|  | 
|  | 1 | +--- | 
|  | 2 | +name: Check | 
|  | 3 | + | 
|  | 4 | +on: | 
|  | 5 | +  push: | 
|  | 6 | +    branches: | 
|  | 7 | +      - '**' | 
|  | 8 | + | 
|  | 9 | +jobs: | 
|  | 10 | +  test: | 
|  | 11 | +    name: Test (Node.js v${{ matrix.node }} on ${{ matrix.os_name }}) | 
|  | 12 | +    runs-on: ${{ matrix.os }} | 
|  | 13 | +    timeout-minutes: 30 | 
|  | 14 | +    strategy: | 
|  | 15 | +      fail-fast: false | 
|  | 16 | +      matrix: | 
|  | 17 | +        os: | 
|  | 18 | +          - ubuntu-latest | 
|  | 19 | +          - macos-latest | 
|  | 20 | +          - windows-latest | 
|  | 21 | +        node: | 
|  | 22 | +          - '16' | 
|  | 23 | +          - '18' | 
|  | 24 | +        include: | 
|  | 25 | +          - os: ubuntu-latest | 
|  | 26 | +            os_name: Linux | 
|  | 27 | +          - os: macos-latest | 
|  | 28 | +            os_name: macOS | 
|  | 29 | +          - os: windows-latest | 
|  | 30 | +            os_name: Windows | 
|  | 31 | +    steps: | 
|  | 32 | +      - name: Checkout | 
|  | 33 | +        uses: actions/checkout@v3 | 
|  | 34 | +      - name: Setup | 
|  | 35 | +        uses: ./.github/actions/setup | 
|  | 36 | +        with: | 
|  | 37 | +          node_version: ${{ matrix.node }} | 
|  | 38 | +      - name: Test | 
|  | 39 | +        run: npm test | 
|  | 40 | +  lint: | 
|  | 41 | +    name: Lint (Node.js v${{ matrix.node }}) | 
|  | 42 | +    runs-on: ubuntu-latest | 
|  | 43 | +    timeout-minutes: 30 | 
|  | 44 | +    strategy: | 
|  | 45 | +      fail-fast: false | 
|  | 46 | +      matrix: | 
|  | 47 | +        node: | 
|  | 48 | +          - '16' | 
|  | 49 | +          - '18' | 
|  | 50 | +    steps: | 
|  | 51 | +      - name: Checkout | 
|  | 52 | +        uses: actions/checkout@v3 | 
|  | 53 | +      - name: Setup | 
|  | 54 | +        uses: ./.github/actions/setup | 
|  | 55 | +        with: | 
|  | 56 | +          node_version: ${{ matrix.node }} | 
|  | 57 | +      - name: Lint | 
|  | 58 | +        run: npm run lint | 
|  | 59 | +  build: | 
|  | 60 | +    name: Build | 
|  | 61 | +    uses: ./.github/workflows/_build.yml | 
|  | 62 | +  install: | 
|  | 63 | +    name: Install (Node.js v${{ matrix.node }} on ${{ matrix.os_name }}) | 
|  | 64 | +    runs-on: ${{ matrix.os }} | 
|  | 65 | +    timeout-minutes: 30 | 
|  | 66 | +    needs: build | 
|  | 67 | +    strategy: | 
|  | 68 | +      fail-fast: false | 
|  | 69 | +      matrix: | 
|  | 70 | +        os: | 
|  | 71 | +          - ubuntu-latest | 
|  | 72 | +          - macos-latest | 
|  | 73 | +          - windows-latest | 
|  | 74 | +        node: | 
|  | 75 | +          - '16' | 
|  | 76 | +          - '18' | 
|  | 77 | +        include: | 
|  | 78 | +          - os: ubuntu-latest | 
|  | 79 | +            os_name: Linux | 
|  | 80 | +          - os: macos-latest | 
|  | 81 | +            os_name: macOS | 
|  | 82 | +          - os: windows-latest | 
|  | 83 | +            os_name: Windows | 
|  | 84 | +    steps: | 
|  | 85 | +      - name: Setup Node.js | 
|  | 86 | +        uses: actions/setup-node@v3 | 
|  | 87 | +        with: | 
|  | 88 | +          node-version: ${{ matrix.node }} | 
|  | 89 | +      - name: Download artifact | 
|  | 90 | +        uses: actions/download-artifact@v3 | 
|  | 91 | +        with: | 
|  | 92 | +          name: ${{ needs.build.outputs.artifact_name }} | 
|  | 93 | +          path: . | 
|  | 94 | +      - name: Find packages | 
|  | 95 | +        uses: tj-actions/glob@v16 | 
|  | 96 | +        id: packages | 
|  | 97 | +        with: | 
|  | 98 | +          files: '*.tgz' | 
|  | 99 | +      - name: Create package.json | 
|  | 100 | +        uses: DamianReeves/[email protected] | 
|  | 101 | +        with: | 
|  | 102 | +          write-mode: overwrite | 
|  | 103 | +          path: package.json | 
|  | 104 | +          contents: | | 
|  | 105 | +            {"type":"module"} | 
|  | 106 | +      - name: Create index.js | 
|  | 107 | +        uses: DamianReeves/[email protected] | 
|  | 108 | +        with: | 
|  | 109 | +          write-mode: overwrite | 
|  | 110 | +          path: index.js | 
|  | 111 | +          contents: | | 
|  | 112 | +            import '@makenew/tsmodule' | 
|  | 113 | +      - name: Install | 
|  | 114 | +        run: npm install --save ${{ steps.packages.outputs.paths }} | 
|  | 115 | +      - name: Run | 
|  | 116 | +        run: node index.js | 
|  | 117 | +  typecheck: | 
|  | 118 | +    name: Typecheck (Node.js v${{ matrix.node }}) | 
|  | 119 | +    runs-on: ubuntu-latest | 
|  | 120 | +    timeout-minutes: 30 | 
|  | 121 | +    strategy: | 
|  | 122 | +      fail-fast: false | 
|  | 123 | +      matrix: | 
|  | 124 | +        node: | 
|  | 125 | +          - '16' | 
|  | 126 | +          - '18' | 
|  | 127 | +    steps: | 
|  | 128 | +      - name: Checkout | 
|  | 129 | +        uses: actions/checkout@v3 | 
|  | 130 | +      - name: Setup | 
|  | 131 | +        uses: ./.github/actions/setup | 
|  | 132 | +        with: | 
|  | 133 | +          node_version: ${{ matrix.node }} | 
|  | 134 | +      - name: Typecheck | 
|  | 135 | +        run: npm run typecheck | 
0 commit comments