Skip to content

Commit

Permalink
Add basic CI
Browse files Browse the repository at this point in the history
  • Loading branch information
remileduc committed Nov 9, 2023
1 parent dfcfbd1 commit 8b31c52
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/actions/build-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: ⚒️ Build - 🧹 Lint

on: workflow_call

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Build
run: npm run build

- name: Lint
run: npm run lint
11 changes: 11 additions & 0 deletions .github/actions/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 📙 Documentation

on: workflow_call

jobs:
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- name: Biuld documentation
run: npm run doc
25 changes: 25 additions & 0 deletions .github/actions/install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 📥 Install

on: workflow_call

jobs:
install:
name: Install
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "latest"
cache: "npm"

- name: Output versions
run: |
node --version
npm --version
- name: Install NPM dependencies
run: npm install
11 changes: 11 additions & 0 deletions .github/actions/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 📝 Tests

on: workflow_call

jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Run tests
run: npm test
19 changes: 19 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: ⚙️ CI

on: push

jobs:
call-install:
uses: ./.github/actions/install.yaml@${{github.ref_name}}

call-build-lint:
needs: call-install
uses: ./.github/actions/build-lint.yaml@${{github.ref_name}}

call-tests:
needs: call-install
uses: ./.github/actions/tests.yaml@${{github.ref_name}}

call-docs:
needs: call-install
uses: ./.github/actions/docs.yaml@${{github.ref_name}}
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# config
.github/
.clang-format
.editorconfig
.eslintrc.json
Expand Down

0 comments on commit 8b31c52

Please sign in to comment.