Debian Codegraph @

.github/workflows/test-lang-js.yml

raw
1 # Licensed to the Apache Software Foundation (ASF) under one or more
2 # contributor license agreements. See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 #
8 # https://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 name: 'Test JavaScript'
17 on:
18 workflow_dispatch:
19 push:
20 branches: [ main ]
21 pull_request:
22 branches: [ main ]
23 paths:
24 - .github/workflows/test-lang-js.yml
25 - lang/js/**
26
27 defaults:
28 run:
29 working-directory: lang/js
30
31 concurrency:
32 group: ${{ github.workflow }}-${{ github.ref }}
33 cancel-in-progress: true
34
35 jobs:
36 test:
37 runs-on: ${{ matrix.os }}
38 strategy:
39 matrix:
40 os:
41 - ubuntu-latest
42 - ubuntu-24.04-arm
43 node:
44 - 12
45 - 14
46 - 16
47 steps:
48 - uses: actions/checkout@v5
49 - name: Setup Node
50 uses: actions/setup-node@v4
51 with:
52 node-version: ${{ matrix.node }}
53
54 - uses: actions/cache@v4
55 with:
56 path: ~/.npm
57 key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
58 restore-keys: |
59 ${{ runner.os }}-node-
60
61 - name: Lint
62 run: ./build.sh lint
63
64 - name: Test
65 run: ./build.sh test
66
67 interop:
68 runs-on: ${{ matrix.os }}
69 strategy:
70 matrix:
71 os:
72 - ubuntu-latest
73 - ubuntu-24.04-arm
74 node:
75 - 12
76 - 14
77 - 16
78 steps:
79 - uses: actions/checkout@v5
80 - name: Setup Node
81 uses: actions/setup-node@v4
82 with:
83 node-version: ${{ matrix.node }}
84
85 - uses: actions/cache@v4
86 with:
87 path: ~/.npm
88 key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
89 restore-keys: |
90 ${{ runner.os }}-node-
91
92 - name: Setup Python for Generating Input Data
93 uses: actions/setup-python@v5
94
95 - name: Apt Install Compression Libs Required by Python
96 run: |
97 sudo apt-get update && \
98 sudo apt-get install -qqy --no-install-recommends libbz2-dev \
99 liblzma-dev \
100 libsnappy-dev \
101 libzstd-dev
102 - name: Install Python Dependencies
103 run: |
104 python3 -m pip install --break-system-packages --upgrade pip setuptools tox
105 python3 -m pip install --break-system-packages python-snappy zstandard
106
107 - name: Create Interop Data Directory
108 working-directory: .
109 run: mkdir -p build/interop/data
110
111 - name: Generate Interop Data using Python
112 working-directory: lang/py
113 run: ./build.sh interop-data-generate
114
115 - name: Generate Interop Data
116 run: ./build.sh interop-data-generate
117
118 - name: Run Interop Tests
119 run: npm install && ./build.sh interop-data-test