Skip to content

Commit f436ef1

Browse files
committed
Update sources and tests
1 parent 7e90504 commit f436ef1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+6783
-6555
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG] ___ doesn't work"
5+
labels: bug
6+
assignees: raub
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. ___
16+
2. ___
17+
3. ___
18+
19+
**Expected behavior**
20+
Description of what you expected to happen.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "[FEAT] ____"
5+
labels: new
6+
assignees: raub
7+
8+
---
9+
10+
**Describe the solution you'd like**
11+
Description of what you want to happen.
12+
13+
**Describe alternatives you've considered**
14+
Description of alternative solutions or features you've considered.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Description
2+
<!-- A concise description of what the PR does. -->
3+
4+
5+
## Test Plan
6+
<!-- How can a reviewer test the changes included in this PR? -->
7+
1.
8+
2.
9+
3.
10+
11+
12+
## Checklist
13+
<!-- Ensure that your PR fulfills the following requirements -->
14+
- [ ] I've followed the code style.
15+
- [ ] I've tried running the code with my changes.
16+
- [ ] The docs and TS declarations are in sync with code changes.
17+
- [ ] (optional) I've added unit tests for my changes.

.github/workflows/build.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Build Binaries
2+
defaults:
3+
run:
4+
shell: bash
5+
6+
on:
7+
workflow_dispatch
8+
9+
jobs:
10+
create_release:
11+
name: Create Release
12+
if: contains('["raub"]', github.actor)
13+
runs-on: ubuntu-latest
14+
15+
outputs:
16+
upload_url: ${{ steps.create_release.outputs.upload_url }}
17+
18+
steps:
19+
20+
- name: Fetch Repository
21+
uses: actions/checkout@v4
22+
with:
23+
persist-credentials: false
24+
25+
- name: Install Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 22.14.0
29+
cache: 'npm'
30+
31+
- name: Get Package Version
32+
id: package-version
33+
run: node -p "'version='+require('./package').version" >> $GITHUB_OUTPUT
34+
35+
- name: Create Release
36+
id: create_release
37+
uses: softprops/action-gh-release@v2
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
with:
41+
tag_name: ${{ steps.package-version.outputs.version }}
42+
name: Release ${{ steps.package-version.outputs.version }}
43+
44+
build:
45+
name: Build
46+
strategy:
47+
matrix:
48+
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2022, macos-14]
49+
50+
runs-on: ${{ matrix.os }}
51+
52+
steps:
53+
54+
- name: Fetch Repository
55+
uses: actions/checkout@v4
56+
with:
57+
persist-credentials: false
58+
59+
- name: Install Node.js
60+
uses: actions/setup-node@v4
61+
with:
62+
node-version: 22.14.0
63+
cache: 'npm'
64+
65+
- name: Install Modules
66+
run: npm ci
67+
68+
- name: Build Current Binary
69+
run: npm run build
70+
71+
- name: Get Package Version
72+
id: package-version
73+
run: node -p "'version='+require('./package').version" >> $GITHUB_OUTPUT
74+
75+
- name: Pack Files
76+
id: pack-files
77+
run: node -e "require('addon-tools-raub').actionPack()" >> $GITHUB_OUTPUT
78+
79+
- name: Store Binaries
80+
uses: softprops/action-gh-release@v2
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
with:
84+
tag_name: ${{ steps.package-version.outputs.version }}
85+
name: Release ${{ steps.package-version.outputs.version }}
86+
files: ${{ steps.pack-files.outputs.pack }}

.github/workflows/cpplint.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Cpplint
2+
defaults:
3+
run:
4+
shell: bash
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
pull_request:
11+
branches:
12+
- master
13+
14+
jobs:
15+
eslint:
16+
name: Cpplint
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
21+
- name: Fetch Repository
22+
uses: actions/checkout@v4
23+
with:
24+
persist-credentials: false
25+
26+
- name: Install Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 22.14.0
30+
cache: 'npm'
31+
32+
- name: Install Modules
33+
run: npm ci
34+
35+
- name: Install Python
36+
uses: actions/setup-python@v4
37+
with:
38+
python-version: '3.12'
39+
40+
- name: Install Cpplint
41+
run: pip install cpplint
42+
43+
- name: Run Cpplint
44+
run: |
45+
node -e "require('addon-tools-raub').cpcpplint()"
46+
cpplint --recursive ./src/cpp

.github/workflows/eslint.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: ESLint
2+
defaults:
3+
run:
4+
shell: bash
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
pull_request:
11+
branches:
12+
- master
13+
14+
jobs:
15+
eslint:
16+
name: ESLint
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
21+
- name: Fetch Repository
22+
uses: actions/checkout@v4
23+
with:
24+
persist-credentials: false
25+
26+
- name: Install Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 22.14.0
30+
cache: 'npm'
31+
32+
- name: Install Modules
33+
run: npm ci
34+
35+
- name: Run ESLint
36+
run: npm run eslint

.github/workflows/publish.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish to NPM
2+
defaults:
3+
run:
4+
shell: bash
5+
6+
on:
7+
workflow_dispatch
8+
9+
jobs:
10+
Publish:
11+
if: contains('["raub"]', github.actor)
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
16+
- name: Fetch Repository
17+
uses: actions/checkout@v4
18+
with:
19+
persist-credentials: false
20+
21+
- name: Install Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 22.14.0
25+
cache: 'npm'
26+
27+
- name: Get Package Version
28+
id: package-version
29+
run: node -p "'version='+require('./package').version" >> $GITHUB_OUTPUT
30+
31+
- name: Publish
32+
run: |
33+
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
34+
npm publish --ignore-scripts
35+
env:
36+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
37+
38+
- name: Create Release
39+
id: create_release
40+
uses: softprops/action-gh-release@v2
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
tag_name: ${{ steps.package-version.outputs.version }}
45+
name: Release ${{ steps.package-version.outputs.version }}

.github/workflows/test.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Test
2+
defaults:
3+
run:
4+
shell: bash
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
pull_request:
11+
branches:
12+
- master
13+
14+
jobs:
15+
unit-tests:
16+
name: Unit Tests
17+
strategy:
18+
matrix:
19+
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2022, macos-14]
20+
21+
runs-on: ${{ matrix.os }}
22+
23+
steps:
24+
25+
- name: Fetch Repository
26+
uses: actions/checkout@v4
27+
with:
28+
persist-credentials: false
29+
30+
- name: Install Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 22.14.0
34+
cache: 'npm'
35+
36+
- name: Install Modules
37+
run: npm ci
38+
39+
- name: Build Current Binary
40+
run: npm run build
41+
42+
- name: Run Unit Tests
43+
run: npm run test-ci

.travis.yml

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

0 commit comments

Comments
 (0)