Skip to content

Commit

Permalink
Merge pull request #6 from seatgeek/zh-ci
Browse files Browse the repository at this point in the history
Add lint and test CI
  • Loading branch information
zhammer authored Jan 29, 2024
2 parents 53f4248 + 0967e69 commit ce26007
Show file tree
Hide file tree
Showing 13 changed files with 1,340 additions and 95 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install
- run: yarn tsc
- run: yarn prettier:check
- run: yarn lint:all
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install
- run: yarn test
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist
dist-types
coverage
.vscode
e2e-test-report/
20 changes: 10 additions & 10 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
- Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
- The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ This project follow's SeatGeek's [Open Source Community Guidelines](CODE_OF_COND

## Contribution process

All submissions, including submissions by project members, require review. We use [GitHub pull
All submissions, including submissions by project members, require review. We use [GitHub pull
requests](https://docs.github.com/articles/about-pull-requests) for this purpose.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ their respective locations.

## Preview the collection

We have created a demo Backstage application to preview the SeatGeek Backstage Plugins Collection. To view it, clone this repository and run `yarn install && yarn dev`.
We have created a demo Backstage application to preview the SeatGeek Backstage Plugins Collection. To view it, clone this repository and run `yarn install && yarn dev`.
2 changes: 1 addition & 1 deletion app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ catalog:
- type: file
target: ../../mock-catalog/templates/create-postgres-database.yaml
- type: file
target: ../../mock-catalog/templates/create-python-module.yaml
target: ../../mock-catalog/templates/create-python-module.yaml
2 changes: 1 addition & 1 deletion mock-catalog/entities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ metadata:
spec:
type: service
owner: product
lifecycle: production
lifecycle: production
2 changes: 1 addition & 1 deletion mock-catalog/organization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ metadata:
name: guests
spec:
type: team
children: []
children: []
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
},
"resolutions": {
"@types/react": "^17",
"@types/react-dom": "^17"
"@types/react-dom": "^17",
"knex": "^3.1.0"
},
"prettier": "@spotify/prettier-config",
"lint-staged": {
Expand Down
4 changes: 1 addition & 3 deletions packages/app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ import { AppRouter, FlatRoutes } from '@backstage/core-app-api';
import { CatalogGraphPage } from '@backstage/plugin-catalog-graph';
import { RequirePermission } from '@backstage/plugin-permission-react';
import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';
import {
AwardsPage
} from '@internal/plugin-awards';
import { AwardsPage } from '@internal/plugin-awards';

const app = createApp({
apis,
Expand Down
2 changes: 0 additions & 2 deletions packages/app/src/components/Root/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { PropsWithChildren } from 'react';
import { makeStyles } from '@material-ui/core';
import HomeIcon from '@material-ui/icons/Home';
import ExtensionIcon from '@material-ui/icons/Extension';
import MapIcon from '@material-ui/icons/MyLocation';
import LibraryBooks from '@material-ui/icons/LibraryBooks';
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
import LogoFull from './LogoFull';
Expand All @@ -19,7 +18,6 @@ import {
SidebarGroup,
SidebarItem,
SidebarPage,
SidebarScrollWrapper,
SidebarSpace,
useSidebarOpenState,
Link,
Expand Down
17 changes: 2 additions & 15 deletions packages/app/src/components/catalog/EntityPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,8 @@ import {
} from '@backstage/plugin-org';
import { EntityTechdocsContent } from '@backstage/plugin-techdocs';
import { EmptyState } from '@backstage/core-components';
import {
Direction,
EntityCatalogGraphCard,
} from '@backstage/plugin-catalog-graph';
import {
RELATION_API_CONSUMED_BY,
RELATION_API_PROVIDED_BY,
RELATION_CONSUMES_API,
RELATION_DEPENDENCY_OF,
RELATION_DEPENDS_ON,
RELATION_HAS_PART,
RELATION_PART_OF,
RELATION_PROVIDES_API,
stringifyEntityRef,
} from '@backstage/catalog-model';
import { EntityCatalogGraphCard } from '@backstage/plugin-catalog-graph';
import { stringifyEntityRef } from '@backstage/catalog-model';
import { UserAwardsCard } from '@internal/plugin-awards';
import { EntityScaffolderContent } from '@internal/plugin-entity-scaffolder-content';

Expand Down
Loading

0 comments on commit ce26007

Please sign in to comment.