File: ci.yaml

package info (click to toggle)
python-aiohttp 3.13.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,964 kB
  • sloc: python: 62,038; ansic: 20,773; makefile: 417; sh: 3
file content (70 lines) | stat: -rw-r--r-- 1,763 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: CI

on: [push, pull_request]

env:
  CI: true

permissions:
  contents: read

jobs:
  ci:
    name: Build, Test and Lint
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os:
          - macos-latest
          - ubuntu-latest
          - windows-latest
    steps:
      - name: Install clang for Windows
        if: runner.os == 'Windows'
        run: |
          iwr -useb get.scoop.sh -outfile 'install.ps1'
          .\install.ps1 -RunAsAdmin
          scoop install llvm --global

          # Scoop modifies the PATH so we make the modified PATH global.
          echo $env:PATH >> $env:GITHUB_PATH

      - name: Setup Node.js
        uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
        with:
          node-version: 20.18.0

      - name: Setup Docker
        uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
        if: runner.os == 'Linux'

      - name: Fetch
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
        with:
          fetch-depth: 1

      # Skip macOS & Windows, cache there is slower
      - name: Restore node_modules cache for Linux
        uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
        with:
          path: ~/.npm
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

      - name: Install dependencies
        run: npm ci

      - name: Build libllhttp.a
        shell: bash
        run: |
          make build/libllhttp.a

      - name: Build WebAssembly
        run: npm run build-wasm
        if: runner.os == 'Linux'

      - name: Run tests
        run: npm run test

      - name: Lint Code
        run: npm run lint
        if: runner.os == 'Linux'