From e5189d97e365911ef9baf3d0d8f39f8270926591 Mon Sep 17 00:00:00 2001 From: Dinesh Sajwan Date: Thu, 14 Sep 2023 11:56:17 -0400 Subject: [PATCH] feat: Initialized projen and added project structure for cdk constructs --- .github/workflows/build.yml | 33 +-------------------------------- .projenrc.ts | 4 ++-- src/index.ts | 2 +- test/hello.test.ts | 2 +- 4 files changed, 5 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1aca7e79..978ae766 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: with: node-version: 16.x - name: Install dependencies - run: yarn install --check-files + run: yarn install --check-files --frozen-lockfile - name: build run: npx projen build - name: Find mutations @@ -52,37 +52,6 @@ jobs: with: name: build-artifact path: dist - self-mutation: - needs: build - runs-on: ubuntu-latest - permissions: - contents: write - if: always() && needs.build.outputs.self_mutation_happened && !(github.event.pull_request.head.repo.full_name != github.repository) - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - token: ${{ secrets.PROJEN_GITHUB_TOKEN }} - ref: ${{ github.event.pull_request.head.ref }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - - name: Download patch - uses: actions/download-artifact@v3 - with: - name: .repo.patch - path: ${{ runner.temp }} - - name: Apply patch - run: '[ -s ${{ runner.temp }}/.repo.patch ] && git apply ${{ runner.temp }}/.repo.patch || echo "Empty patch. Skipping."' - - name: Set git identity - run: |- - git config user.name "github-actions" - git config user.email "github-actions@github.com" - - name: Push changes - env: - PULL_REQUEST_REF: ${{ github.event.pull_request.head.ref }} - run: |- - git add . - git commit -s -m "chore: self mutation" - git push origin HEAD:$PULL_REQUEST_REF package-js: needs: build runs-on: ubuntu-latest diff --git a/.projenrc.ts b/.projenrc.ts index e8c8813a..47c51be2 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -41,6 +41,6 @@ const project = new awscdk.AwsCdkConstructLibrary({ copyrightPeriod: '2023-', copyrightOwner: 'Amazon.com, Inc. or its affiliates. All Rights Reserved.', gitignore: ['*.DS_STORE'], - + mutableBuild: false, }); -project.synth(); \ No newline at end of file +project.synth(); diff --git a/src/index.ts b/src/index.ts index 92c94b81..fb2fabcd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,4 +2,4 @@ export class Hello { public sayHello() { return 'hello, world!'; } -} \ No newline at end of file +} diff --git a/test/hello.test.ts b/test/hello.test.ts index acbacd4d..88b4d939 100644 --- a/test/hello.test.ts +++ b/test/hello.test.ts @@ -2,4 +2,4 @@ import { Hello } from '../src'; test('hello', () => { expect(new Hello().sayHello()).toBe('hello, world!'); -}); \ No newline at end of file +});