Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a GitHub workflow that checks for uncomitted changes #438

Merged
merged 4 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions .github/workflows/projen-drift-check.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .projen/files.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {Linter} from 'eslint'
import {readFileSync} from 'fs'
import * as projen from 'projen'
import {addHusky} from './src/common/git'
import {job, npmRunJobStep} from './src/common/github'
import {ProjenDriftCheckWorkflow, job, npmRunJobStep} from './src/common/github'
import {addLinters} from './src/common/lint'

// ANCHOR Basic setup
Expand Down Expand Up @@ -94,6 +94,8 @@ testGithubWorkflow.addJobs({
build: {...job([npmRunJobStep('build')]), needs: ['lint', 'test', 'typecheck']},
})

new ProjenDriftCheckWorkflow(project.github!, {})

const createReleaseGithubWorkflow = project.github!.addWorkflow('create-release')

createReleaseGithubWorkflow.on({
Expand Down
44 changes: 44 additions & 0 deletions src/apollo-server/__tests__/__snapshots__/index.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/apollo-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {TypeScriptAppProject, TypeScriptProjectOptions} from 'projen/lib/typescr
import {WithDocker} from '../common'
import {AssetFile} from '../common/files/AssetFile'
import {WithGitHooks, addHusky, extendGitignore} from '../common/git'
import {PullRequestTest, WithDefaultWorkflow} from '../common/github'
import {ProjenDriftCheckWorkflow, PullRequestTest, WithDefaultWorkflow} from '../common/github'
import {WithCustomLintPaths, addLinters} from '../common/lint'
import {IWithTelemetryReportUrl, WithTelemetry, collectTelemetry, setupTelemetry} from '../common/telemetry'
import {addVsCode} from '../common/vscode-settings'
Expand Down Expand Up @@ -156,6 +156,7 @@ export class OttofellerApolloServerProject extends TypeScriptAppProject implemen

// ANCHOR Github workflow
PullRequestTest.addToProject(this, {...options, isLighthouseEnabled: false})
ProjenDriftCheckWorkflow.addToProject(this, options)

// ANCHOR Codegen
new AssetFile(this, 'codegen.ts', {sourcePath: path.join(assetsDir, 'codegen.ts'), readonly: false, marker: false})
Expand Down
44 changes: 44 additions & 0 deletions src/cdk/__tests__/__snapshots__/index.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/cdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as projen from 'projen'
import {AwsCdkTypeScriptApp, AwsCdkTypeScriptAppOptions} from 'projen/lib/awscdk'
import {NodePackageManager} from 'projen/lib/javascript'
import {WithGitHooks, addHusky, extendGitignore} from '../common/git'
import {PullRequestTest, ReleaseWorkflow, WithDefaultWorkflow} from '../common/github'
import {ProjenDriftCheckWorkflow, PullRequestTest, ReleaseWorkflow, WithDefaultWorkflow} from '../common/github'
import {WithCustomLintPaths, addLinters} from '../common/lint'
import {IWithTelemetryReportUrl, WithTelemetry, collectTelemetry, setupTelemetry} from '../common/telemetry'
import {addVsCode} from '../common/vscode-settings'
Expand Down Expand Up @@ -113,6 +113,7 @@ export class OttofellerCDKProject extends AwsCdkTypeScriptApp implements IWithTe
if (hasDefaultGithubWorkflows && this.github) {
new ReleaseWorkflow(this.github, {initialReleaseVersion: this.initialReleaseVersion})
PullRequestTest.addToProject(this, {...options, isLighthouseEnabled: false})
ProjenDriftCheckWorkflow.addToProject(this, options)
}

// ANCHOR VSCode settings
Expand Down
Loading