Skip to content

Commit 91216fc

Browse files
committed
build: remove travis in favor of GHA, docs updates.
1 parent dd372f0 commit 91216fc

File tree

4 files changed

+59
-17
lines changed

4 files changed

+59
-17
lines changed

.github/workflows/test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: tests
2+
3+
on: [push]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-22.04
8+
permissions:
9+
id-token: write
10+
contents: read
11+
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
build-type: ['release', 'debug']
16+
node-version: ['16']
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Install packages
21+
run: |
22+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
23+
sudo apt update
24+
sudo apt-get install -y libstdc++-6-dev
25+
26+
- uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
30+
- name: Install and setup
31+
run: |
32+
node -v
33+
which node
34+
clang++ -v
35+
which clang++
36+
make "${{ matrix.build-type }}"
37+
38+
- name: Run tests
39+
run: |
40+
npm test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ build
88
local.env
99
lib/binding
1010
viz/node_modules
11+
node_modules

CONTRIBUTING.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# vtquery
22

33
[![Build Status](https://travis-ci.com/mapbox/vtquery.svg?branch=master)](https://travis-ci.com/mapbox/vtquery)
4-
[![codecov](https://codecov.io/gh/mapbox/vtquery/branch/master/graph/badge.svg)](https://codecov.io/gh/mapbox/vtquery)
54
[![node-cpp-skel](https://raw.githubusercontent.com/mapbox/cpp/master/assets/node-cpp-skel-badge_blue.svg)](https://github.com/mapbox/node-cpp-skel)
65

76
npm install @mapbox/vtquery
@@ -145,7 +144,7 @@ make clean
145144

146145
# Cleans everything, including the things you download from the network in order to compile (ex: npm packages).
147146
# This is useful if you want to nuke everything and start from scratch.
148-
# For example, it's super useful for making sure everything works for Travis, production, someone else's machine, etc
147+
# For example, it's super useful for making sure everything works for github actions, production, someone else's machine, etc
149148
make distclean
150149

151150
# Generate API docs from index.js
@@ -170,6 +169,23 @@ make test
170169
vim src/vtquery.cpp
171170
```
172171

172+
## Code Formatting
173+
174+
We use [this script](/scripts/format.sh#L20) to install a consistent version of [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) to format the code base. The format is automatically checked via a GitHub Action job as well. Run the following script locally to ensure formatting is ready to merge:
175+
176+
```
177+
make format
178+
```
179+
180+
We also use [`clang-tidy`](https://clang.llvm.org/extra/clang-tidy/) as a C++ linter. Run the following command to lint and ensure your code is ready to merge:
181+
182+
```
183+
make tidy
184+
```
185+
186+
These commands are set from within [the Makefile](./Makefile).
187+
188+
173189
# Benchmarks
174190

175191
Benchmarks can be run with the bench/vtquery.bench.js script to test vtquery against common real-world fixtures (provided by mvt-fixtures). When making changes in a pull request, please provide the benchmarks from the master branch and the HEAD of your current branch. You can control the `concurrency` and `iterations` of the benchmarks with the following command:

0 commit comments

Comments
 (0)