Skip to content

Commit

Permalink
Added obj and bin ignore for Cake Frosting Integration Tests
Browse files Browse the repository at this point in the history
cake.test.ts Reorder imports to previious commit

Signed-off-by: Fischer, Louis <louisfischer@gmail.com>

Update __tests__/cake.test.ts

Co-authored-by: Enrico Campidoglio <enrico.campidoglio@gmail.com>
Moved variable per suggestion

cake-build#46 (comment)

action.ts Reorder imports to previous commit

Change the Verbosity Flag to -v to only the .net project references it.
  • Loading branch information
louisfischer committed Apr 14, 2024
1 parent d969cff commit a751462
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,9 @@ typings/

# Secret files
.secrets

# bin folder
bin/

# obj folder
obj/
11 changes: 5 additions & 6 deletions __tests__/cake.test.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import * as path from 'path';
import { exec } from '@actions/exec';
import { which } from '@actions/io';
import * as path from 'path';

import * as cake from '../src/cake';
import { CakeArgument, CakeSwitch } from '../src/cakeParameter';
import { CakeToolSettings } from '../src/cakeToolSettings';
import { ToolsDirectory } from '../src/toolsDirectory';
import { CakeToolSettings } from '../src/cakeToolSettings';
import { CakeArgument, CakeSwitch } from '../src/cakeParameter';

const pathToLocalToolsDirectory = path.join('path', 'to', 'tool');
const pathToLocalTool = path.join(pathToLocalToolsDirectory, 'dotnet-cake');
const dotnetManifestCake = 'dotnet tool run dotnet-cake';
const pathToCsprojFile = path.join('build', 'Build.csproj');
const dotnetManifestCake = 'dotnet tool run dotnet-cake';
const dotnetRun = 'dotnet run';

jest.mock('@actions/exec');
Expand Down Expand Up @@ -244,7 +243,7 @@ describe('When failing to run a Cake Frosting Project', () => {
fakeExec.mockReturnValue(Promise.resolve(-21));
});

test('it should throw error when csproj-path does not exist', async () => {
test('it should throw an error containing the exit code', async () => {
await expect(cake.runProject('', new ToolsDirectory())).rejects.toThrow('-21');
});
});
1 change: 0 additions & 1 deletion src/action.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as core from '@actions/core';

import * as script from './cakeParameter';
import * as input from './input';

Expand Down
2 changes: 1 addition & 1 deletion src/cake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function runProject(
const exitCode = await exec(dotnetRun, [
'--project', csprojPath,
'--no-launch-profile',
'--verbosity', 'minimal',
'-v', 'minimal',
'--configuration', 'Release',
`--paths_tools="${toolsDir}"`,
...cakeParams
Expand Down

0 comments on commit a751462

Please sign in to comment.