Skip to content

Commit

Permalink
Merge pull request #166 from alarmdisplay/github-actions
Browse files Browse the repository at this point in the history
Use GitHub Actions
  • Loading branch information
abrain committed May 18, 2024
2 parents eca7378 + e132131 commit 93c8df0
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 69 deletions.
69 changes: 0 additions & 69 deletions .drone.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/test-console.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI for Console

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

defaults:
run:
working-directory: ./console

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: console/package-lock.json
- run: npm ci
- run: npm run lint
- run: npm run build
30 changes: 30 additions & 0 deletions .github/workflows/test-frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI for Frontend

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

defaults:
run:
working-directory: ./frontend

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- run: npm ci
- run: npm run lint
- run: npm run build
45 changes: 45 additions & 0 deletions .github/workflows/test-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI for Server

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

defaults:
run:
working-directory: ./server

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: server/package-lock.json
- run: npm ci
- run: npm run lint
- run: npm run compile
- run: npm run jest -- --coverage
- name: Upload code coverage to Code Climate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
with:
coverageLocations: |
${{github.workspace}}/server/coverage/lcov.info:lcov
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ${{github.workspace}}/server/coverage
flags: server

0 comments on commit 93c8df0

Please sign in to comment.