Skip to content

Commit

Permalink
Merge pull request #3 from shammy642/add_git_workflows
Browse files Browse the repository at this point in the history
Add git workflows
  • Loading branch information
JHLincoln authored Oct 15, 2024
2 parents 604b7d3 + eea3284 commit 2f680d6
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/api.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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: API CI

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: api


steps:
- uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'npm'
- name: API - install dependencies
run: npm install
- name: API - build
run: npm run build --if-present
- name: API - run tests
run: npm run test


34 changes: 34 additions & 0 deletions .github/workflows/frontend.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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: Frontend CI

on:
push:
branches:
-'*'
pull_request:
branches:
- '*'

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend


steps:
- uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'npm'
- name: Frontend - install dependencies
run: npm install
- name: Frontend - build
run: npm run build --if-present
- name: Frontend - run tests
run: npm run test
7 changes: 7 additions & 0 deletions frontend/tests/test.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { describe, expect, test } from "vitest";

describe('mock test for CI', () => {
test('mock test 1', () => {
expect(true).toBe(true)
})
})

0 comments on commit 2f680d6

Please sign in to comment.