Skip to content

Commit 7512dec

Browse files
authored
Merge pull request #20 from github/add-ci-build-step
Add ci build step
2 parents 10072e2 + 642c9ce commit 7512dec

File tree

5 files changed

+74
-1
lines changed

5 files changed

+74
-1
lines changed

.github/workflows/test.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Node CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Use Node.js 18.x
11+
uses: actions/setup-node@v1
12+
with:
13+
node-version: 18.x
14+
- name: npm install, build, and test
15+
run: |
16+
npm it
17+
env:
18+
CI: true

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

examples/one.ts

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const obj = {
2+
one: 1,
3+
two: 2,
4+
three: 3,
5+
}
6+
7+
;('this config avoids semicolons at the end of statements and uses single quotes for strings')
8+
9+
async function heresAFunctionWhichSpansMulitpleLinesAnd(
10+
that,
11+
includes,
12+
many,
13+
args,
14+
to,
15+
demonstrait,
16+
trailing,
17+
func,
18+
commas
19+
) {
20+
return obj
21+
}
22+
23+
const arrowFunctions = avoidParens => 1

package-lock.json

+27-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
"author": "GitHub Inc.",
1414
"main": "index.js",
1515
"scripts": {
16+
"test:update": "prettier --config ./index.js --write examples/",
17+
"test": "prettier --config ./index.js --check examples/",
1618
"postpublish": "npm publish --ignore-scripts --@github:registry='https://npm.pkg.github.com'"
19+
},
20+
"devDependencies": {
21+
"prettier": "^2.8.0"
1722
}
1823
}

0 commit comments

Comments
 (0)