v7
  1name: zx@7 Test
  2
  3on:
  4  push:
  5  pull_request:
  6  schedule:
  7    - cron: '0 12 */4 * *'
  8
  9permissions:
 10  contents: read
 11
 12env:
 13  FORCE_COLOR: 3
 14  NODE_OPTIONS: '--http-parser=legacy'
 15
 16jobs:
 17  build:
 18    runs-on: ubuntu-latest
 19    steps:
 20      - uses: actions/checkout@v4
 21        with:
 22          persist-credentials: false
 23
 24      - name: Use Node.js 18.x
 25        uses: actions/setup-node@v4
 26        with:
 27          node-version: 18.x
 28          cache: 'npm'
 29
 30      - run: npm ci
 31      - run: |
 32          npm run build
 33          cd build && ls -l
 34      - uses: actions/upload-artifact@v4
 35        with:
 36          name: v7
 37          path: |
 38            build
 39            package.json
 40          retention-days: 1
 41
 42  fast-check:
 43    needs: build
 44    runs-on: ubuntu-latest
 45    steps:
 46      - uses: actions/checkout@v4
 47        with:
 48          persist-credentials: false
 49
 50      - uses: actions/download-artifact@v4
 51        with:
 52          name: v7
 53      - run: npm ci
 54
 55      - name: Code-style
 56        run: npm run fmt:check
 57
 58      - name: Types
 59        run: npm run test:types
 60
 61      - name: Circular
 62        run: npm run test:circular
 63
 64  unit:
 65    needs: build
 66    runs-on: ubuntu-latest
 67    strategy:
 68      matrix:
 69        node-version: [16, 18, 24]
 70    steps:
 71      - uses: actions/checkout@v4
 72        with:
 73          persist-credentials: false
 74
 75      - uses: actions/download-artifact@v4
 76        with:
 77          name: v7
 78
 79      - name: Use Node.js ${{ matrix.node-version }}
 80        uses: actions/setup-node@v4
 81        with:
 82          node-version: ${{ matrix.node-version }}
 83          cache: 'npm'
 84
 85      - run: npm ci
 86
 87      - name: Run units with coverage
 88        if: matrix.node-version == '18'
 89        run: npm run test:coverage
 90        timeout-minutes: 1
 91
 92      - name: Run units
 93        if: matrix.node-version != '18'
 94        run: npm run test:unit
 95        timeout-minutes: 1
 96
 97  win32:
 98    needs: build
 99    runs-on: windows-latest
100    steps:
101      - uses: actions/checkout@v4
102        with:
103          persist-credentials: false
104
105      - uses: actions/download-artifact@v4
106        with:
107          name: v7
108
109      - name: Use Node.js 16.x
110        uses: actions/setup-node@v4
111        with:
112          node-version: 16.x
113
114      - run: npm ci
115
116      - run: npx uvu test win32
117        timeout-minutes: 1