Skip to content

Commit

Permalink
chore(ci): integrated codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed Feb 5, 2024
1 parent 110cdbf commit 0daeff3
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 44 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ jobs:
pnpm run e2e:api
docker compose down
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/apps/api

build-api-alpha:
needs: validate
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ jobs:
run: |
pnpm run test:web
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

build-web-alpha:
needs: validate
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions apps/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage-e2e/{projectRoot}"],
"options": {
"runInBand": true,
"devServerTarget": "api:serve",
"jestConfig": "apps/api/jest.e2e-config.ts",
"runInBand": true
"jestConfig": "apps/api/jest.e2e-config.ts"
},
"configurations": {
"development": {
Expand Down
8 changes: 0 additions & 8 deletions apps/api/src/prisma/migrations/20240205044521_/migration.sql

This file was deleted.

26 changes: 0 additions & 26 deletions apps/api/src/prisma/migrations/20240205044826_/migration.sql

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions apps/api/src/prisma/migrations/20240205101804_/migration.sql

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ ALTER TABLE "ApiKeyWorkspaceScope" DROP CONSTRAINT "ApiKeyWorkspaceScope_apiKeyI
-- DropForeignKey
ALTER TABLE "ApiKeyWorkspaceScope" DROP CONSTRAINT "ApiKeyWorkspaceScope_workspaceId_fkey";

-- DropForeignKey
ALTER TABLE "Project" DROP CONSTRAINT "Project_lastUpdatedById_fkey";

-- DropForeignKey
ALTER TABLE "Secret" DROP CONSTRAINT "Secret_lastUpdatedById_fkey";

-- DropForeignKey
ALTER TABLE "SecretVersion" DROP CONSTRAINT "SecretVersion_createdById_fkey";

-- DropIndex
DROP INDEX "Workspace_isDefault_ownerId_key";

Expand All @@ -29,7 +38,14 @@ ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL;
-- AlterTable
ALTER TABLE "Project" ADD COLUMN "apiKeyWorkspaceAuthorityId" TEXT,
ADD COLUMN "isPublic" BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN "workspaceRoleId" TEXT;
ADD COLUMN "workspaceRoleId" TEXT,
ALTER COLUMN "lastUpdatedById" DROP NOT NULL;

-- AlterTable
ALTER TABLE "Secret" ALTER COLUMN "lastUpdatedById" DROP NOT NULL;

-- AlterTable
ALTER TABLE "SecretVersion" ALTER COLUMN "createdById" DROP NOT NULL;

-- AlterTable
ALTER TABLE "Workspace" DROP COLUMN "isDefault";
Expand Down Expand Up @@ -82,6 +98,9 @@ CREATE UNIQUE INDEX "WorkspaceMemberRoleAssociation_roleId_workspaceMemberId_key
-- CreateIndex
CREATE UNIQUE INDEX "Workspace_name_ownerId_key" ON "Workspace"("name", "ownerId");

-- AddForeignKey
ALTER TABLE "Project" ADD CONSTRAINT "Project_lastUpdatedById_fkey" FOREIGN KEY ("lastUpdatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Project" ADD CONSTRAINT "Project_workspaceRoleId_fkey" FOREIGN KEY ("workspaceRoleId") REFERENCES "WorkspaceRole"("id") ON DELETE SET NULL ON UPDATE CASCADE;

Expand All @@ -93,3 +112,9 @@ ALTER TABLE "WorkspaceMemberRoleAssociation" ADD CONSTRAINT "WorkspaceMemberRole

-- AddForeignKey
ALTER TABLE "WorkspaceMemberRoleAssociation" ADD CONSTRAINT "WorkspaceMemberRoleAssociation_workspaceMemberId_fkey" FOREIGN KEY ("workspaceMemberId") REFERENCES "WorkspaceMember"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "SecretVersion" ADD CONSTRAINT "SecretVersion_createdById_fkey" FOREIGN KEY ("createdById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Secret" ADD CONSTRAINT "Secret_lastUpdatedById_fkey" FOREIGN KEY ("lastUpdatedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
4 changes: 2 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getJestProjects } from '@nx/jest';
import { getJestProjects } from '@nx/jest'

export default {
projects: getJestProjects()
};
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@
"build:workspace": "nx run workspace:build",
"build:cli": "nx run cli:build",
"test": "nx run-many -t test --parallel",
"test:api": "nx run api:test",
"test:api": "nx run api:test -- --collectCoverage --coverageReporters=json",
"e2e:api:prepare": "NODE_ENV='e2e' DATABASE_URL='postgresql://prisma:prisma@localhost:5433/tests' pnpm run db:deploy-migrations",
"e2e:api": "pnpm run e2e:api:prepare && NODE_ENV='e2e' DATABASE_URL='postgresql://prisma:prisma@localhost:5433/tests' nx run api:test:e2e",
"e2e:api": "pnpm run e2e:api:prepare && NODE_ENV='e2e' DATABASE_URL='postgresql://prisma:prisma@localhost:5433/tests' nx run api:test:e2e -- --collectCoverage --coverageReporters=json",
"test:web": "nx run web:test",
"test:workspace": "nx run workspace:test",
"test:cli": "nx run cli:test",
Expand Down

0 comments on commit 0daeff3

Please sign in to comment.