Skip to content

Commit

Permalink
TypeScript Checks (#31)
Browse files Browse the repository at this point in the history
* Add build check & test for cdk

* Fix build error

* Working directory to cdk

* Fix error hopefully
  • Loading branch information
NChitty authored Mar 19, 2024
1 parent 82e167e commit 09444a6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
name: "Rust Lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
Expand All @@ -43,22 +43,37 @@ jobs:
name: "Rust Tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Tests
working-directory: lambda
run: cargo test

tsbuild:
name: "CDK Build & Test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- working-directory: ./cdk
run: |
npm ci
npm run build
npm test
eslint:
name: "CDK Lint"
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
7 changes: 0 additions & 7 deletions cdk/lib/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,12 @@ export default class PipelineStack extends Stack {
projectsHostedZone.grantDelegation(prodRoleWrapper.delegationRole);

const stagingStage = new MealPlannerStage(this, 'MealPlannerAppStaging', {
delegationRole: stagingRoleWrapper.delegationRole,
domain: stagingRoleWrapper.normalizedDomain,
env: stagingEnvironment,
parentHostedZoneId: projectsHostedZone.hostedZoneId,
});
const prodStage = new MealPlannerStage(this, 'MealPlannerAppProd', {
delegationRole: prodRoleWrapper.delegationRole,
domain: prodRoleWrapper.normalizedDomain,
env: prodEnvironment,
parentHostedZoneId: projectsHostedZone.hostedZoneId,
});

pipeline.addStage(sharedStage);
pipeline.addStage(stagingStage);
pipeline.addStage(prodStage).addPre(new ManualApprovalStep('ProdApproval'));
}
Expand Down

0 comments on commit 09444a6

Please sign in to comment.