Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit d0cab0e

Browse files
committed
Add CI
1 parent 3a477ee commit d0cab0e

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/ci.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: macos-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
path: ninja
17+
18+
- name: Use Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 16
22+
23+
- name: Run snapshot.js
24+
run: |
25+
node createBinDir.js
26+
node snapshot.js
27+
working-directory: ninja

createBinDir.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Create bin dir for CI
2+
3+
const fs = require("fs");
4+
const path = require("path");
5+
6+
const platform = process.platform;
7+
const arch = process.arch;
8+
9+
const binDir = platform === "darwin" ? platform + arch : platform;
10+
const binPath = path.join(__dirname, "..", binDir);
11+
12+
fs.mkdirSync(binPath);

0 commit comments

Comments
 (0)