Skip to content

Commit

Permalink
ci: add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonrybczak committed Oct 31, 2023
1 parent d3d19b3 commit 36f83a2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
cache: 'gradle'
java-version: 17
- uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.0.1

- uses: ruby/setup-ruby@v1
if: runner.os == 'macOS'
Expand Down
16 changes: 13 additions & 3 deletions __e2e__/root.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ afterAll(() => {
cleanup(cwd);
});

test('works when Gradle is run outside of the project hierarchy', () => {
test('works when Gradle is run outside of the project hierarchy', async () => {
/**
* Location of Android project
*/
Expand All @@ -52,10 +52,20 @@ test('works when Gradle is run outside of the project hierarchy', () => {
*/
const gradleWrapper = path.join(androidProjectRoot, 'gradlew');

await spawnScript(
gradleWrapper,
['wrapper', '--gradle-version=8.0.1', '--distribution-type', 'bin'],
{
cwd: androidProjectRoot,
},
);

// Execute `gradle` with `-p` flag and `cwd` outside of project hierarchy
const {stdout} = spawnScript(gradleWrapper, ['-p', androidProjectRoot], {
const response = spawnScript(gradleWrapper, ['-p', androidProjectRoot], {
cwd: '/',
});

expect(stdout).toContain('BUILD SUCCESSFUL');
console.log(response);

expect(response).toContain('BUILD SUCCESSFUL');
});
2 changes: 1 addition & 1 deletion jest/setupE2eTests.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
jest.setTimeout(60000);
jest.setTimeout(240000);
6 changes: 6 additions & 0 deletions packages/cli/src/tools/__tests__/copyFiles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ test('copies text and binary files from source to destination', async () => {
]
`);

console.log('DIR', fs.readdirSync(path.join(DIR, 'extraDir')));
fs.readFile(path.join(DIR, 'file1.js'), 'utf8', (err, data) => {
console.log('err', err);
console.log('data', data);
});

['binary.keystore', 'file1.js', 'file2.txt'].forEach((file) => {
expect(fs.readFileSync(path.join(src, file))).toEqual(
fs.readFileSync(path.join(DIR, file)),
Expand Down

0 comments on commit 36f83a2

Please sign in to comment.