Skip to content

Commit

Permalink
setup github actions for pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
daretodave committed Apr 24, 2024
1 parent ea0b34c commit 49646fd
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 6 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build.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: MTERM build

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

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 20.0
cache: 'npm'
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
- name: Run test
uses: borales/actions-yarn@v4
with:
cmd: build
30 changes: 30 additions & 0 deletions .github/workflows/lint.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: MTERM lint

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

jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 20.0
cache: 'npm'
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
- name: Run test
uses: borales/actions-yarn@v4
with:
cmd: lint
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 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: MTERM build and test
name: MTERM build

on:
push:
Expand All @@ -15,16 +15,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 20.0
cache: 'npm'
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
cmd: install
- name: Run test
uses: borales/actions-yarn@v4
with:
cmd: test
cmd: test
2 changes: 1 addition & 1 deletion src/main/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { RunnerWindow } from './window/windows/runner'
import { Workspace } from './framework/workspace'
import { DEFAULT_SETTINGS, DEFAULT_WORKSPACE } from '../constants'
import { ErrorModal } from './window/windows/error-modal'
import { boostrap, BootstrapContext } from './bootstrap'
import { boostrap } from './bootstrap'

jest.mock('electron', () => ({
app: {
Expand Down
2 changes: 1 addition & 1 deletion src/preload/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { electronAPI } from '@electron-toolkit/preload'
declare global {
interface Window {
electron: typeof electronAPI
api: any
api: unknown
}
}

Expand Down

0 comments on commit 49646fd

Please sign in to comment.