parent
a93722a356
commit
78c7ef8809
4 changed files with 0 additions and 77 deletions
@ -1,32 +0,0 @@ |
|||||||
name: Node.js CI |
|
||||||
|
|
||||||
on: |
|
||||||
push: |
|
||||||
branches: [ master, beta ] |
|
||||||
pull_request: |
|
||||||
branches: [ master ] |
|
||||||
|
|
||||||
jobs: |
|
||||||
build: |
|
||||||
env: |
|
||||||
CLIENT_DIR: ./client |
|
||||||
|
|
||||||
runs-on: ubuntu-latest |
|
||||||
strategy: |
|
||||||
matrix: |
|
||||||
node-version: [10.x, 12.x, 13.x] |
|
||||||
|
|
||||||
steps: |
|
||||||
- uses: actions/checkout@v2 |
|
||||||
- name: Use Node.js ${{ matrix.node-version }} |
|
||||||
uses: actions/setup-node@v1 |
|
||||||
with: |
|
||||||
node-version: ${{ matrix.node-version }} |
|
||||||
- run: npm ci |
|
||||||
working-directory: ${{env.CLIENT_DIR}} |
|
||||||
- run: npm run build --if-present |
|
||||||
working-directory: ${{env.CLIENT_DIR}} |
|
||||||
- run: npm test |
|
||||||
working-directory: ${{env.CLIENT_DIR}} |
|
||||||
env: |
|
||||||
CI: true |
|
@ -1,19 +0,0 @@ |
|||||||
{ |
|
||||||
"name": "personal-website", |
|
||||||
"version": "1.1.0", |
|
||||||
"private": true, |
|
||||||
"description": "A nice introduction to my chaos", |
|
||||||
"scripts": { |
|
||||||
"test": "node test_runner" |
|
||||||
}, |
|
||||||
"repository": { |
|
||||||
"type": "git", |
|
||||||
"url": "git+https://github.com/Raymonzut/Personal-Website.git" |
|
||||||
}, |
|
||||||
"author": "Raymonzut", |
|
||||||
"license": "ISC", |
|
||||||
"bugs": { |
|
||||||
"url": "https://github.com/Raymonzut/Personal-Website/issues" |
|
||||||
}, |
|
||||||
"homepage": "https://github.com/Raymonzut/Personal-Website#readme" |
|
||||||
} |
|
@ -1,4 +0,0 @@ |
|||||||
const assert = require('assert').strict |
|
||||||
const me = require('../src/me') |
|
||||||
|
|
||||||
assert(me.age() > 0, 'age should return a positive number') |
|
@ -1,22 +0,0 @@ |
|||||||
const { spawn } = require('child_process') |
|
||||||
const fs = require('fs') |
|
||||||
|
|
||||||
const dirs = ['./test', './tests'] |
|
||||||
|
|
||||||
if (!dirs.some(fs.existsSync)) { |
|
||||||
throw Error("Could not find any test directories, looked for: " + dirs) |
|
||||||
} |
|
||||||
|
|
||||||
const test_dirs = dirs.filter(fs.existsSync) |
|
||||||
|
|
||||||
test_dirs.forEach(test_dir => { |
|
||||||
const files = fs.readdirSync(test_dir) |
|
||||||
|
|
||||||
if (files.length === 0) { |
|
||||||
throw Error("Could not find test files in " + test_dir) |
|
||||||
} |
|
||||||
|
|
||||||
const childs = files.map(file =>
|
|
||||||
spawn('node', [`${test_dir}/${file}`], { stdio: 'inherit' })
|
|
||||||
) |
|
||||||
}) |
|
Loading…
Reference in new issue