From 469d66c201b7614e98c883751529789e52ae1783 Mon Sep 17 00:00:00 2001 From: Dave Olsthoorn Date: Tue, 11 Aug 2020 19:20:52 +0200 Subject: [PATCH] Run prettier, to pass format-check --- __tests__/matchers.test.ts | 10 ++++---- src/install.ts | 7 +---- src/main.ts | 52 +++++++++++++++++++------------------- 3 files changed, 32 insertions(+), 37 deletions(-) diff --git a/__tests__/matchers.test.ts b/__tests__/matchers.test.ts index dfc94c4..c920110 100644 --- a/__tests__/matchers.test.ts +++ b/__tests__/matchers.test.ts @@ -1,5 +1,5 @@ -describe('setup-android', () => { - it('has sanity', async () => { - expect(true) - }) -}) +describe('setup-android', () => { + it('has sanity', async () => { + expect(true) + }) +}) diff --git a/src/install.ts b/src/install.ts index 291f5eb..fae1d22 100644 --- a/src/install.ts +++ b/src/install.ts @@ -25,12 +25,7 @@ export async function install(): Promise { fs.mkdirSync(ANDROID_REPOSITORIES_DIR, {recursive: true}) fs.closeSync(fs.openSync(ANDROID_REPOSITORIES_CFG, 'w')) - const acceptBuffer = Buffer.from( - Array(10) - .fill('y') - .join('\n'), - 'utf8' - ) + const acceptBuffer = Buffer.from(Array(10).fill('y').join('\n'), 'utf8') let sdkManager = '' if (process.platform === 'linux') { diff --git a/src/main.ts b/src/main.ts index ac44498..9edaaa3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,26 +1,26 @@ -import * as core from '@actions/core' -import * as path from 'path' -import {ANDROID_SDK_ROOT, ANNOTATION_MATCHERS} from './constants' -import {preGradleCache, preAndroidCache, preGradleWrapper} from './cache' -import {install} from './install' - -async function run(): Promise { - // process all caching but wait for them to all complete - await Promise.all([preGradleWrapper(), preGradleCache(), preAndroidCache()]) - - await install() - - core.exportVariable('ANDROID_HOME', ANDROID_SDK_ROOT) - core.exportVariable('ANDROID_SDK_ROOT', ANDROID_SDK_ROOT) - - core.addPath(path.join(ANDROID_SDK_ROOT, 'tools', 'bin')) - core.addPath(path.join(ANDROID_SDK_ROOT, 'platform-tools')) - - core.debug('add matchers') - const matchersPath = path.join(__dirname, '..', '..', '.github') - for (const matcher of ANNOTATION_MATCHERS) { - console.log(`##[add-matcher]${path.join(matchersPath, matcher)}`) - } -} - -run() +import * as core from '@actions/core' +import * as path from 'path' +import {ANDROID_SDK_ROOT, ANNOTATION_MATCHERS} from './constants' +import {preGradleCache, preAndroidCache, preGradleWrapper} from './cache' +import {install} from './install' + +async function run(): Promise { + // process all caching but wait for them to all complete + await Promise.all([preGradleWrapper(), preGradleCache(), preAndroidCache()]) + + await install() + + core.exportVariable('ANDROID_HOME', ANDROID_SDK_ROOT) + core.exportVariable('ANDROID_SDK_ROOT', ANDROID_SDK_ROOT) + + core.addPath(path.join(ANDROID_SDK_ROOT, 'tools', 'bin')) + core.addPath(path.join(ANDROID_SDK_ROOT, 'platform-tools')) + + core.debug('add matchers') + const matchersPath = path.join(__dirname, '..', '..', '.github') + for (const matcher of ANNOTATION_MATCHERS) { + console.log(`##[add-matcher]${path.join(matchersPath, matcher)}`) + } +} + +run()