Skip to content

Commit 30b5fcc

Browse files
authored
ci: setup basic CI (#90)
1 parent 1c02206 commit 30b5fcc

File tree

93 files changed

+10445
-7387
lines changed

Some content is hidden

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

93 files changed

+10445
-7387
lines changed

.eslintignore

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,10 @@ syntest/
88
.*
99
*.json
1010
*.md
11-
benchmark/
11+
LICENSE*
12+
13+
# The instrumentation files are copied from istanbul (and modified).
14+
# In the future in a big refactor the instrumentation should be redone such that these files dont have to be ignored anymore.
15+
src/instrumentation/Instrumenter.ts
16+
src/instrumentation/VisitState.ts
17+
src/instrumentation/Visitor.ts

.eslintrc.json

+1-12
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,6 @@
1616
},
1717
"plugins": ["@typescript-eslint"],
1818
"rules": {
19-
"require-jsdoc": [
20-
"error",
21-
{
22-
"require": {
23-
"FunctionDeclaration": true,
24-
"MethodDefinition": false,
25-
"ClassDeclaration": false,
26-
"ArrowFunctionExpression": false,
27-
"FunctionExpression": false
28-
}
29-
}
30-
]
19+
"no-fallthrough": "off"
3120
}
3221
}

.github/CODEOWNERS

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Default owners (unless a later match takes precedence).
2+
# They will be requested for review when someone opens a pull request.
3+
* @syntest-framework/approvers

.github/ISSUE_TEMPLATE/bug_report.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Environment information (please complete the following information):**
27+
28+
- OS: [e.g. Ubuntu]
29+
- Version [e.g. 0.1.0]
30+
31+
**Additional context**
32+
Add any other context about the problem here.
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ""
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST/pull_request.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## Pull Request template
2+
Please, go through these steps before you submit a PR.
3+
4+
1. Make sure that your PR is not a duplicate.
5+
2. If not, then make sure that:
6+
7+
a. You have done your changes in a separate branch. Branches MUST have descriptive names that start with the issue number as a prefix.
8+
9+
b. You have a descriptive commit message with a short title (first line) following the [conventional commits format](https://www.conventionalcommits.org/en/v1.0.0/)
10+
11+
c. You have only one commit (if not, squash them into one commit).
12+
13+
d. `npm test` doesn't throw any error. If it does, fix them first and amend your commit (`git commit --amend`).
14+
15+
3. **After** these steps, you're ready to open a pull request.
16+
17+
a. Your pull request MUST NOT target the `master` branch on this repository. You probably want to target `develop` instead.
18+
19+
b. Give a descriptive title to your PR.
20+
21+
c. Provide a description of your changes.
22+
23+
d. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes.
24+
25+
IMPORTANT: Please review the [CONTRIBUTING.md](../CONTRIBUTING.md) file for detailed contributing guidelines.
26+
27+
**PLEASE REMOVE THIS TEMPLATE BEFORE SUBMITTING**
28+
29+
30+
31+
# [Title]
32+
33+
- [x] Change 1
34+
- [x] Change 2
35+
36+
closes #XXXX

.github/workflows/build.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
paths-ignore:
7+
- "docs/"
8+
- "**.md"
9+
pull_request:
10+
branches: [main, develop]
11+
paths-ignore:
12+
- "docs/"
13+
- "**.md"
14+
15+
jobs:
16+
test:
17+
runs-on: ${{ matrix.os }}
18+
19+
strategy:
20+
# Keep running other versions when a job fails
21+
fail-fast: false
22+
23+
matrix:
24+
# Run the pipeline on all the currently supported OS versions
25+
os: [ubuntu-latest]
26+
27+
# Run the pipeline on all the currently supported LTS versions and the upcoming version
28+
node-version: [18, 19]
29+
30+
# Run the pipeline on all the currently supported architectures
31+
architecture: [x64]
32+
33+
steps:
34+
# Cloning
35+
- uses: actions/checkout@v2
36+
37+
# Setup
38+
- name: Use Node.js ${{ matrix.node-version }}
39+
uses: actions/setup-node@v2
40+
with:
41+
node-version: ${{ matrix.node-version }}
42+
architecture: ${{ matrix.architecture }}
43+
44+
# Caching
45+
- name: Get NPM cache directory
46+
id: npm-cache-dir
47+
run: echo "::set-output name=dir::$(npm config get cache)"
48+
- name: Cache Node.js modules
49+
uses: actions/cache@v2
50+
with:
51+
path: ${{ steps.npm-cache-dir.outputs.dir }}
52+
key: ${{ runner.os }}-node-${{ hashFiles('*/package.json') }}
53+
restore-keys: |
54+
${{ runner.os }}-node-
55+
${{ runner.os }}-
56+
57+
# Dependencies
58+
- name: JavaScript - Install Dependencies
59+
run: npm install
60+
61+
# Building
62+
- name: JavaScript - Build
63+
run: npm run build
64+
65+
# Testing
66+
- name: JavaScript - Run Tests
67+
run: npm test

.github/workflows/verify.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: verify
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
paths-ignore:
7+
- "docs/"
8+
- "**.md"
9+
pull_request:
10+
branches: [main, develop]
11+
paths-ignore:
12+
- "docs/"
13+
- "**.md"
14+
15+
jobs:
16+
test:
17+
runs-on: ${{ matrix.os }}
18+
19+
strategy:
20+
# Keep running other versions when a job fails
21+
fail-fast: false
22+
23+
matrix:
24+
# Run the pipeline on all the currently supported OS versions
25+
os: [ubuntu-latest]
26+
27+
# Run the pipeline on all the currently supported LTS versions and the upcoming version
28+
node-version: [19]
29+
30+
# Run the pipeline on all the currently supported architectures
31+
architecture: [x64]
32+
33+
steps:
34+
# Cloning
35+
- uses: actions/checkout@v2
36+
37+
# Setup
38+
- name: Use Node.js ${{ matrix.node-version }}
39+
uses: actions/setup-node@v2
40+
with:
41+
node-version: ${{ matrix.node-version }}
42+
architecture: ${{ matrix.architecture }}
43+
44+
# Caching
45+
- name: Get NPM cache directory
46+
id: npm-cache-dir
47+
run: echo "::set-output name=dir::$(npm config get cache)"
48+
- name: Cache Node.js modules
49+
uses: actions/cache@v2
50+
with:
51+
path: ${{ steps.npm-cache-dir.outputs.dir }}
52+
key: ${{ runner.os }}-node-${{ hashFiles('package.json') }}
53+
restore-keys: |
54+
${{ runner.os }}-node-
55+
${{ runner.os }}-
56+
57+
# Dependencies
58+
- name: JavaScript - Install Dependencies
59+
run: npm install
60+
61+
# Format
62+
- name: JavaScript - Run Formatter
63+
run: npm run format:check
64+
65+
# Linting
66+
- name: JavaScript - Run Linter
67+
run: npm run lint

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx --no -- commitlint --edit

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.mocharc.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extension": ["ts"],
3+
"spec": "test/**/*.test.ts",
4+
"require": "ts-node/register"
5+
}

.prettierignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.nyc_output/
22
dist/
33
node_modules/
4-
benchmark/
4+
.*
5+
LICENSE*

.syntest.js

-110
This file was deleted.

0 commit comments

Comments
 (0)