diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 7c9d42a..61e936d 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -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: @@ -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/action-electron-builder@v2.0.0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..91e00c9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/package.json b/package.json index 92d0c2d..077f72c 100644 --- a/package.json +++ b/package.json @@ -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",