From 6820873735db42be49e0133479bccf45531d7936 Mon Sep 17 00:00:00 2001 From: Jan Vilimek Date: Tue, 6 Dec 2022 14:01:16 +0100 Subject: [PATCH] Bugfix/release lint fix (#126) * lint fix * CI now runs also lint etc --- .github/workflows/ci.yml | 29 +++++++++++++++---- .../ScoreCardTable/ScoreCardTable.test.tsx | 6 ++-- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3db74a9e6..4875e6609d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,7 @@ permissions: jobs: build: + # TODO: template for build to DRY for CI and for publish workflows runs-on: ubuntu-latest strategy: matrix: @@ -27,9 +28,28 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: yarn install --frozen-lockfile - - run: yarn lint - - run: yarn tsc - - run: yarn test + + - name: validate config + run: yarn backstage-cli config:check --lax + + - name: lint + run: yarn backstage-cli repo lint + + - name: type checking and declarations + run: yarn tsc:full + + - name: build + run: yarn backstage-cli repo build --all + env: + CI: true + + - name: verify type dependencies + run: yarn lint:type-deps + + - name: test + run: | + yarn lerna -- run test -- --coverage --runInBand + - name: Cypress e2e tests uses: cypress-io/github-action@v2 with: @@ -38,6 +58,3 @@ jobs: project: ./packages/app env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: yarn build - env: - CI: true diff --git a/plugins/score-card/src/components/ScoreCardTable/ScoreCardTable.test.tsx b/plugins/score-card/src/components/ScoreCardTable/ScoreCardTable.test.tsx index db49ea185a..50284a50ce 100644 --- a/plugins/score-card/src/components/ScoreCardTable/ScoreCardTable.test.tsx +++ b/plugins/score-card/src/components/ScoreCardTable/ScoreCardTable.test.tsx @@ -69,9 +69,8 @@ describe('ScoreBoardPage-EmptyData', () => { }); }); - describe('ScoreCard-TestWithData', () => { - class MockClient implements ScoringDataApi { + class MockClient implements ScoringDataApi { getScore( _entity?: Entity | undefined, ): Promise { @@ -90,6 +89,7 @@ describe('ScoreCard-TestWithData', () => { const mockClient = new MockClient(); // TODO: find how to stop render the progress bar and display the ScoreCardTable + // eslint-disable-next-line jest/no-commented-out-tests // it('should render title', async () => { // jest.useFakeTimers(); @@ -128,7 +128,7 @@ describe('ScoreCard-TestWithData', () => { await findByTestId('score-board-table'); const podcastColumn = await getByText('podcast'); - const podcastRow = podcastColumn.closest("tr"); + const podcastRow = podcastColumn.closest('tr'); expect(podcastRow).toHaveTextContent('AB+DFFC'); }); });