Skip to content

Commit

Permalink
chore: 👷 add and update CI build system
Browse files Browse the repository at this point in the history
  • Loading branch information
samiurprapon committed Sep 22, 2024
1 parent 224dd94 commit fcf3bfc
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 35 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Android Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
branches: [main, android]
types: [opened, synchronize, closed]
push:
branches: [main, android]

jobs:
build:
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, 'android')" # skips everything in this job if head commit message does not contain 'android'

steps:
- name: Enter to android folder
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/build/backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build backend

on:
pull_request:
branches: [main, backend]
types: [opened, synchronize, closed]
push:
branches: [main, backend]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 3

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# cache: 'npm'
- name: Go to directory
run: cd ./backend

- name: Install Packages
run: npm install

- name: Test backend
run: npm run test --if-present

- name: Build
run: npm run build --if-present
37 changes: 37 additions & 0 deletions .github/workflows/build/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Frontend Build

on:
pull_request:
branches: [main, frontend]
types: [opened, synchronize, closed]
push:
branches: [main, frontend]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 3

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# cache: 'npm'
- name: Go to directory
run: cd ./frontend

- name: Install Packages
run: npm install

- name: Test backend
run: npm run test --if-present

- name: Build
run: npm run build --if-present
1 change: 1 addition & 0 deletions .github/workflows/release/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# implement later
1 change: 1 addition & 0 deletions .github/workflows/release/backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# implement later
1 change: 1 addition & 0 deletions .github/workflows/release/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# implement later
31 changes: 0 additions & 31 deletions .github/workflows/server.yml

This file was deleted.

0 comments on commit fcf3bfc

Please sign in to comment.