Skip to content

Commit

Permalink
Adds actions files for ui (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj authored Sep 18, 2023
1 parent a6476fd commit 8f2e9a7
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 7 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ui-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build & Test UI

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

jobs:
build-test:
name: Build & Test UI
strategy:
matrix:
runner: [ubuntu-latest, ubicloud]
runs-on: ${{ matrix.runner }}
steps:
- name: checkout
uses: actions/checkout@v3

- name: Install Node.js dependencies
working-directory: ui
run: yarn install --frozen-lockfile

- name: Build
working-directory: ui
run: yarn build
36 changes: 36 additions & 0 deletions .github/workflows/ui-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Lint UI

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

permissions:
checks: write
contents: write

jobs:
run-linters:
name: Run UI linters
strategy:
matrix:
runner: [ubuntu-latest, ubicloud]
runs-on: ${{ matrix.runner }}
steps:
- name: checkout
uses: actions/checkout@v3

- name: Install Node.js dependencies
working-directory: ui
run: yarn install --frozen-lockfile

- name: lint
uses: wearerequired/lint-action@v2
with:
eslint: true
prettier: true
eslint_dir: ui
prettier_dir: ui
12 changes: 12 additions & 0 deletions generate_protos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -xeuo pipefail

# check if buf is installed
if ! command -v buf &> /dev/null
then
echo "buf could not be found"
echo "Please install buf: https://buf.build/docs/installation"
exit
fi

buf generate protos
6 changes: 1 addition & 5 deletions ui/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"extends": [
"next",
"plugin:storybook/recommended",
"prettier"
]
"extends": ["next", "plugin:storybook/recommended", "prettier"]
}
3 changes: 2 additions & 1 deletion ui/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
.next
.next
**/grpc_generated
1 change: 0 additions & 1 deletion ui/app/connectors/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { SearchField } from '@/lib/SearchField';
import { Select } from '@/lib/Select';
import { Table, TableCell, TableRow } from '@/lib/Table';
import { GetFlowServiceClient } from '@/rpc/rpc';
import getConfig from 'next/config';
import Link from 'next/link';
import { Suspense } from 'react';
import { Header } from '../../lib/Header';
Expand Down

0 comments on commit 8f2e9a7

Please sign in to comment.