Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6f9b1f1

Browse files
committed
Proposal: Clean up CI job a bit
relates to TheAlgorithms#586 and TheAlgorithms#720 Added npm scripts for doctest and style checking via standard. This allows us to call those directly via npm and not via npx. The CI job itself is now split into distinct steps (makes it more visible which step failed).
1 parent 90b04ea commit 6f9b1f1

File tree

3 files changed

+32
-25
lines changed

3 files changed

+32
-25
lines changed

‎.github/workflows/ci.yml‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Continuous Integration
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-node@v2
11+
with:
12+
node-version: '14'
13+
14+
- name: 📦 Install dependencies
15+
run: npm ci
16+
env:
17+
CI: true
18+
19+
- name: 🧪 Run tests
20+
run: |
21+
npm run doctest || true # TODO: Add all doctests
22+
npm test
23+
env:
24+
CI: true
25+
26+
- name: 💄 Code style
27+
run: npm run style
28+
env:
29+
CI: true

‎.github/workflows/nodejs.yml‎

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

‎package.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"description": "A repository for All algorithms implemented in Javascript (for educational purposes only)",
55
"main": "",
66
"scripts": {
7-
"test": "jest --no-cache"
7+
"doctest": "doctest **/*.js",
8+
"test": "jest --no-cache",
9+
"style": "standard"
810
},
911
"author": "TheAlgorithms",
1012
"license": "GPL-3.0",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /