Skip to content

Commit

Permalink
feat: add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjoeoui committed Dec 1, 2023
1 parent 7f64e08 commit c007c98
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ env:
AZURE_CERT_NAME: ${{ secrets.AZURE_CERT_NAME }}

jobs:
buildElectron:
build-electron:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest-xlarge, ubuntu-latest, windows-latest]
env:
DEBUG: electron-builder

steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -78,8 +79,8 @@ jobs:
run: |
dotnet tool install --global AzureSignTool
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v2
# - name: Install Snapcraft
# uses: samuelmeuli/action-snapcraft@v2

- name: Build/release Electron app
uses: flojoy-ai/[email protected]
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
python-code-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout repository

- uses: chartboost/ruff-action@v1
name: Ruff format check
with:
args: format --check .

python-code-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout repository

- uses: chartboost/ruff-action@v1
name: Ruff linter check

ts-code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout repository

- uses: actions/setup-node@v3
name: Install Node.js 20
with:
node-version: 20

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Cache pnpm
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install NPM Dependencies
run: pnpm install

- name: Prettier check
run: pnpm run check

- name: TypeScript check
run: pnpm run typecheck
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"homepage": "https://flojoy.ai",
"scripts": {
"format": "prettier --write .",
"check": "prettier --check .",
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
Expand Down

0 comments on commit c007c98

Please sign in to comment.