Skip to content

Commit

Permalink
ci: add nut test to pipeline on windows docker
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarvin8 committed Oct 21, 2024
1 parent 686cdc6 commit 313ad40
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 16 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/non-release-build.yml

This file was deleted.

13 changes: 11 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,18 @@ permissions:
jobs:
unit-tests:
uses: salesforcecli/github-workflows/.github/workflows/unitTest.yml@main

nuts:
needs: unit-tests
uses: salesforcecli/github-workflows/.github/workflows/nut.yml@main
secrets: inherit
strategy:
matrix:
os: [windows-latest]
fail-fast: false
with:
os: ${{ matrix.os }}
release:
needs: [unit-tests]
needs: [unit-tests, nuts]
name: Release
runs-on: ubuntu-latest
steps:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test

on:
push:
branches-ignore:
- main

jobs:
unit-tests:
uses: salesforcecli/github-workflows/.github/workflows/unitTest.yml@main
nuts:
needs: unit-tests
uses: salesforcecli/github-workflows/.github/workflows/nut.yml@main
secrets: inherit
strategy:
matrix:
os: [windows-latest]
fail-fast: false
with:
os: ${{ matrix.os }}
8 changes: 4 additions & 4 deletions test/commands/acc-transformer/transform.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('acc-transformer transform NUTs', () => {
const testXmlPath3 = resolve('coverage3.xml');

const configFile = {
packageDirectories: [{ path: 'test/baselines', default: true }],
packageDirectories: [{ path: 'force-app', default: true }, { path: 'packaged' }],
namespace: '',
sfdcLoginUrl: 'https://login.salesforce.com',
sourceApiVersion: '58.0',
Expand Down Expand Up @@ -50,21 +50,21 @@ describe('acc-transformer transform NUTs', () => {

it('runs transform on the deploy coverage file without file extensions.', async () => {
const command = `acc-transformer transform --coverage-json "${deployCoverageNoExts}" --xml "${testXmlPath1}"`;
const output = execCmd(command, { ensureExitCode: 0, cli: 'sf' }).shellOutput.stdout;
const output = execCmd(command, { ensureExitCode: 0 }).shellOutput.stdout;

expect(output.replace('\n', '')).to.equal(`The coverage XML has been written to ${testXmlPath1}`);
});

it('runs transform on the deploy coverage file with file extensions.', async () => {
const command = `acc-transformer transform --coverage-json "${deployCoverageWithExts}" --xml "${testXmlPath2}"`;
const output = execCmd(command, { ensureExitCode: 0, cli: 'sf' }).shellOutput.stdout;
const output = execCmd(command, { ensureExitCode: 0 }).shellOutput.stdout;

expect(output.replace('\n', '')).to.equal(`The coverage XML has been written to ${testXmlPath2}`);
});

it('runs transform on the test coverage file.', async () => {
const command = `acc-transformer transform --coverage-json "${testCoverage}" --xml "${testXmlPath3}"`;
const output = execCmd(command, { ensureExitCode: 0, cli: 'sf' }).shellOutput.stdout;
const output = execCmd(command, { ensureExitCode: 0 }).shellOutput.stdout;

expect(output.replace('\n', '')).to.equal(`The coverage XML has been written to ${testXmlPath3}`);
});
Expand Down

0 comments on commit 313ad40

Please sign in to comment.